美文网首页
Git 常用命令

Git 常用命令

作者: Scofeild | 来源:发表于2018-05-24 14:42 被阅读24次

git add .  --把当前分支所修改的文件添加到缓存区

git checkout branch --选取分支

git branch  --本地分支 *号的是当前分支

git status --查看当前文件状态

git reset HEAD 当前文件路径名字 ---从commit 中移除

git log --查看节点 会得到 commit id

git reset commitId --会回到上一次提交的缓存区,代码还是你修改的

git revert HEAD --撤销前一次 commit

git branch name 在本地创建一个分支

git pull 拉取更新

git push origin 远程分支名 -- 提交代码

git push -u origin 远程分支名 -- 提交代码

相关文章

网友评论

      本文标题:Git 常用命令

      本文链接:https://www.haomeiwen.com/subject/gcrsjftx.html