git 常用命令

2020-04-28  本文已影响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
上一篇 下一篇

猜你喜欢

热点阅读