git config --global color.ui yes
git config --global push.default current
- you will push only current branch (not all - it may be unexpected)
git log --pretty=format:"%Cgreen%h%Creset %ad %C(cyan)%an%Creset - %s%C(red)%d%Creset" --graph --date=short
- nicer git log
git config --global alias.s 'status'
git config --global alias.c 'commit -m'
git config --global alias.cc 'commit -a -m'
git config --global alias.l 'log --pretty=format:"%Cgreen%h%Creset %ad %C(cyan)%an%Creset - %s%C(red)%d%Creset" --graph --date=short'
git config --global alias.ll 'log --pretty=format:"%Cgreen%h%Creset %ad %C(cyan)%an%Creset - %s%C(red)%d%Creset" --graph --date=short --all'
git commit --amend
- add changes to last commit
git add -p
- patch (e.g. two commits from one file)
git cherry-pick #commithash
- add selected commits to another branch
git branch newfeature
-> git reset --hard HEAD~x
- replace last x
commits to new branch