Useful Terminal Commands
Git
Reset to master
> git reset --hard origin/master
Remove all branches but master:
> git branch | grep -v "master" | xargs git branch -D
Init submodules
> git submodule update --init --recursive
Diff
> git diff --name-only SHA1 SHA2
> git diff --name-only origin/master BRANCH_NAME
> git --no-pager diff --name-only origin/master BRANCH_NAME
Tags
> git tag master-1.13.0
> git push origin master-1.13.0
Remove gitignored files
If gitignore got updated and some of the files that are already included should be ignored, this will remove them from the repository
> git rm -r --cached .
> git add .
Other
Convert all tabs to 4 spaces in .cs files
> find . -name '*.cs' ! -type d -exec bash -c 'expand -t 4 "$0" > /tmp/e && mv /tmp/e "$0"' {} \;