“`”
Workspace:工作区
Index/Stage:暂存区
Repository:仓库区(或本地仓库)
Remote:远程仓库
git init; (# 在当前目录新建一个Git代码库)
git add (添加当前目录的所有文件到暂存区)
git rm –cached [file] (# 停止追踪指定文件,但该文件会保留在工作区)
git commit [file1] [file2] -m [message] (# 提交暂存区的指定文件到仓库区 )
git branch -a (列出所有本地分支和远程分支)
git checkout [branch-name] (# 切换到指定分支,并更新工作区)
git status( # 显示有变更的文件)
git push [remote] -tags (# 提交所有tag)
详细参见:<a class=""url"" href=""http://www.ruanyifeng.com/blog/2015/12/git"" target=""_blank"">http://www.ruanyifeng.com/blog/2015/12/git</a>一cheat一sheet.html
<pre><code> "“`
Was this helpful?
0 /
0