avatar

目录
git命令集
Code
1
git init
Code
1
git clone <repo> <directory>
Code
1
git status -s
Code
1
git diff
Code
1
git add # 添加缓存区
Code
1
git commit -m "content" # 添加仓库
Code
1
git commit -a # 可跳过git add
Code
1
git reset HEAD
Code
1
git rm <file>
Code
1
git rm -f <file> # 强制删除在缓存区文件
Code
1
git rm --cached <file> # 从缓存区删除,但不从工作目录删除
Code
1
git mv # 移动或重命名文件
Code
1
git branch
Code
1
git branch (branchname)
Code
1
git checkout (branchname)
Code
1
git checkout -b (branchname)
Code
1
git branch -d (branchname)
Code
1
git merge (branchname)
Code
1
git log
Code
1
2
3
4
5
git log --oneline
git log --graph
git log --reverse
git log --author=authorname
git log --since/after
Code
1
git tag -a v1.0
Code
1
2
3
4
5
6
git remote add origin git@github.com:tianqixin/runoob-git-test.git
git push -u origin master
git remote -v
git fetch origin [master]
git merge origin/master
git push origin master
文章作者: 3927o
文章链接: http://yoursite.com/git%E5%91%BD%E4%BB%A4/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 lin's document

评论