共计 281 个字符,预计需要花费 1 分钟才能阅读完成。
新建 branch 并 push
- 切换到根底分支如 master 或者其余改变过的分支
git checkout master
git checkout $OTHER_BRANCH_NAME
2. 创立并切换到新分支
git checkout -b $NEW_BRANCH_NAME
能够应用 git branch
或者 git status
查看是否在 new branch 上。
3. 更新分支代码并提交
git add .
git commit -m "init NEW_BRANCH_NAME"
git push origin $NEW_BRANCH_NAME
- 查看 remote host 的所有 branches:
git branch -a
待续。。
正文完