Git change last commit message (that is not yet pushed)


git commit --amend -m "updated message"

source: https://help.github.com/articles/changing-a-commit-message/#commit-has-not-been-pushed-online

Advertisements

Git – my aliases

git config --global alias.poule 'pull'
git config --global alias.s 'status'
git config --global alias.hist 'log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short'
git config --global alias.a 'add .'
git config --global alias.pu 'pull'
git config --global alias.ac "!git add . && git commit"
git config --global alias.pp "!git pull && git push"
git config --global alias.po 'push'

My favorite is obviously “ac” because I can do
git ac -m "my commit message"
and this simple line add and commit all the modified files 🙂

And I also use a lot git pp to pull and push in one line!