Useful Git Commands
Sometime, we need to discard local changes, and need to download the repository from server. General git command git pull failed in this occasion.
By this way, any of your local changes will be lost, also, any local commit will also be lost.
If you have added new file, that are not tracked by GIT, will be remained.
Here is the command:
git fetch --all
git reset --hard origin/
git reset --hard origin/master
Git commands are applicable on GitHub, Bitbucket or any server that host Git.