-
比较两次提交之间的文件,只显示文件名
$ git diff --stat
-
Git cherry-pick 和 rebase 的混合用法
$ git checkout master $ git cherry-pick D $ git cherry-pick F $ git checkout topic $ git rebase master
-
Removing Git Tag On Remote Repository
$ git push origin :refs/tags/<mytag>
-
Check the conflict, but do not merge branch
# In the master branch $ git merge dev --no-ff --no-commit git merge —abort
-
Removing the Remote Branch
$ git push origin :branch_name
-
How many lines of code were added/changed by one person
$ git log --shortstat --author "jair" --since "2012-01-01" --until "2013-09-01" | grep "files changed" | awk '{files+=$1; inserted+=$4; deleted+=$6} END {print "files changed", files, "lines inserted:", inserted, "lines deleted:", deleted}’
-
Change commit author at one specific commit
$ git commit --amend --author="Author Name <email@address.com>"
Created
May 26, 2013 09:19
-
-
Save jairzh/5652183 to your computer and use it in GitHub Desktop.
Git Useful commands
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment