Show informations

git log --author="<your-name>" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\\n", add, subs, loc }' -

Commit with empty message

  1. git config --global alias.nccommit "commit -a --allow-empty-message -m ''"
  2. git nccommit

Bind local branch with remote branch

git branch --set-upstream-to=origin/remote_branch your_branch

Reset local branch to remote branch

git fetch origin && git reset --hard origin/master

Merge

Undoing Things