Some useful Git commands

Stop tracking and ignore changes to a file or folder in Git

Stop tracking all files recursively in folder conf/

 git rm -r --cached conf/.
Changing or setting a remote’s URL
 git remote set-url originĀ git@github.com:username/yourrepository.git
Create a new branch
 git branch <branchName>
Switch to a branch
 git checkout <branchName>
To revert to previous commit, ignoring any changes:
git reset --hard HEAD

Thanks to: https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging
Thanks to: http://stackoverflow.com/questions/4114095/revert-git-repo-to-a-previous-commit