列出当前配置:
git config --list列出 repository 配置:
git config --local --list列出全局配置:
git config --global --list设置 git 输出彩色:
git config --global color.ui auto显示与上次提交版本的不同:
git diff提交历史:
git log显示所有提交历史:
git log --oneline列出所有分支:
git branch列出远程分支:
git branch -r切换分支:
git checkout <branch>给当前版本添加 tag:
git tag <tag-name>列出当前配置的远程端:
git remote -v添加远程端:
git remote add <remote-name> <url>下载远程端但不 merge:
git fetch <remote>下载远程端并自动 merge:
git pull删除远程端分支:
git push <remote> --delete <branch>发布标签:
git push --tags回滚到上个 commit:
git reset --hard HEAD回滚到某个版本:
git reset --hard <commit>清除 staged:
git reset HEAD
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Comment

