Status of file
Relation between Work Space and Version Base
Instruction for Backtrace
git rm --cached <file> :to remove file in staged zonegit checkout -- <file> modified file (which has not been add to staged zone), can use this instruct to trace backgit reset HEAD <file> 上一条命令是在未执行 git add 命令便修改文件生效并放入暂存区,可使用 git checkout 命令。那么如果不慎已经执行了 git add,则可使用本命令。再对需要恢复的文件使用上一条命令即可。git clean <file> -f 如果你的工作区混入了未知内容,你没有追踪它,但是想清除它的话就可以使用本命令,它可以帮你把未知内容剔除出去。
Branch
git branch <branch-name>create a branch base on current branch, and change to the new branchgit... read more
Git 操作笔记
Status of file
Relation between Work Space and Version Base
Instruction for Backtrace
git rm --cached <file> :to remove file in staged zone
git checkout -- <file> modified file (which has not been add to staged zone), can use this instruct to trace back
git reset HEAD <file> 上一条命令是在未执行 git add 命令便修改文件生效并放入暂存区,可使用 git checkout 命令。那么如果不慎已经执行了 git add,则可使用本命令。再对需要恢复的文件使用上一条命令即可。
git clean <file> -f 如果你的工作区混入了未知内容,你没有追踪它,但是想清除它的话就可以使用本命令,它可以帮你把未知内容剔除出去。
Branch
git branch <branch-name>
create a branch base on current branch, and change to the new branch
git branch -D[d] <branch-name>
delete a branch . (D for complusively)
git branch -a
list all branches
git checkout <branch-name>
Comments