当前位置:   article > 正文

git流程_on branch dev your branch is up to date with 'orig

on branch dev your branch is up to date with 'origin/dev'. nothing to commit

fork(如果是成员,可省略)
1、克隆代码

git clone 你的地址
  • 1

2、查看、添加远程仓库

git remote -v
  • 1
git remote add origin 仓库名
  • 1

切记不要直接push主仓库
3、查看分支、状态

git branch
  • 1
* 当前分支
  • 1
$ git status
On branch develop
Your branch is up to date with 'origin/develop'.

nothing to commit, working tree clean

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

4、新建分支
**我们先不要一股脑的在develop分支上直接开敲,先打开git bash ,先pull一下主仓库保证代码最新,

git pull origin master
  • 1

之后先新建一个分支,git checkout -b 分支名称**

$ git checkout -b check
Switched to a new branch 'check'

$ git branch
* check
  develop

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
git diff #可以查看这次修改了什么,那些妥当,那些不妥当,按q可以退出

  • 1
  • 2
git add .  #这里的点是全部修改内容,或者自行选中单个文件
  • 1
git commit -m "feat:add UserManagement"
  • 1
git push origin HEAD:分支名称
  • 1
git checkout develop #切换到develop分支
git merge check # 将check分支合并到当前分支
git branch -d check #删除check分支

  • 1
  • 2
  • 3
  • 4
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/264719
推荐阅读
相关标签
  

闽ICP备14008679号