How to add your Project to Version Control – Part: 4
How to remove all your files and folder from GIT Repo and Restore repo with new folder/file in GIT:
Run following commands on your project root directory.
>git rm -rf * //deleting all files & folder
>git status //list out deleted files and folder
>git commit -m “your comment” //commit
Execute below command when you get “fatal: ‘origin’ does not appear to be a git repository” error message during push
>git remote add origin <YOUR GITHUP REPO URL>
>git push //push empty repo. Now you repo will be empty. Cross verify on github REPO URL
The same steps we can follow for new clone setup: (refer Part 2)
Copy New files/folder & replace with folder.
>git add -A or git add .
>git commit -m”<Commit message>”
>git push origin <branchName>
Once after done the git push, go and check github account. Committed files and folder will be start reflect on your github account.