美文网首页
git提交代码常用命令行集合

git提交代码常用命令行集合

作者: 有一个程序媛 | 来源:发表于2021-07-02 13:57 被阅读0次

git add . // 暂存文件

git pull origin feature-ocr // 拉去远程feature-ocr分支的最新代码

git commit -m '提交代码描述'  // 提交代码的记录描述备注

git push origin feature-ocr  // 把feature-ocr代码推送到远程

git checkout develop  // 切到develop分支

git merge feature-ocr // 将feature-ocr分支的代码合并到develop分支

git push origin develop  // 把develop代码推送到远程

git branch  // 查看当前分支

git branch -a // 查看所有分支,包含远程分支

git checkout -b v-light // 新建分支v-light

git push origin v-light:v-light // 推送本地分支(v-light)到远程分支(远程分支与本地分支同名)

相关文章

网友评论

      本文标题:git提交代码常用命令行集合

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