Ammend the commit message
$ git commit --amend -m "New commit message"
Change name file to lowercase or uppercase
$ git mv uppercase_file temp_file
$ git mv temp_file lowercase_file
Revert last merge
$ git reset --merge ORIG_HEAD
Other option for reverting last merge and pushing the branch
$ git reset —hard HEAD^
$ git push -f
Adding git-completion
$ curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
# .bash_profile
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi
$ chmod +x ~/.git-completion.bash
$ source .bash_profile
touch ~/.gitignore_global
vim ~/.gitignore_global
... .DS_Store .DS_Store? ...
git config --global core.excludesfile ~/.gitignore_global