美文网首页
git 常用命令

git 常用命令

作者: 逸笛 | 来源:发表于2020-04-28 17:25 被阅读0次

签代码流程

git pull origin master 从 master 拉代码到当前分支

git add . 将所有文件改动都添加到暂存区 (add 后面有个点)

git commit -m '备注' 提交代码

git push origin master 推送代码到服务器

出现冲突情况

git stash 缓存本地更改代码

git pull origin master

git stash pop 从缓存中拿出代码

手动解决冲突 注意 pop 出来是代码是远程代码

git add .

git commit -m '备注'

git push origin master

相关文章

网友评论

      本文标题:git 常用命令

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