.gitconfig
and git commands I use. 😉
Open .gitconfig
! 😉
If you use Windows, make sure you setup the following section to the corresponding variables:
[user]
name = %USERNAME%
email = %EMAIL%
[core]
excludesFile = %USERNAME%\\.gitignore
git push --force origin
gitk --reflog
git checkout -f another-branch
git log --graph --pretty=oneline --abbrev-commit
git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(green)%C(bold)%ad%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --date=short
git fetch --prune --prune-tags
git branch --merged | grep -v '\\*\\|master\\|develop' | xargs -n 1 -r git branch -d
git checkout develop | git delete-merged | git remote prune origin | git prune | git prune-tags | git clean -df | git gc
git checkout master | git delete-merged | git remote prune origin | git prune | git prune-tags | git clean -df | git gc
git rev-parse --abbrev-ref HEAD
git pull --rebase origin develop
git pull --rebase origin master