分叉,克隆,签出分支,然后推回到同一分支

时间:2018-03-08 01:26:30

标签: git github

我一直在遇到同样的问题,我无法回到我结账的同一个分支机构。我正在研究的回购是Angular University,Angular Material。我希望能够在家里和工作中使用我的机器。我的想法是拆除仓库,将它克隆到两台机器上,然后检查我想要处理的分支(它会是相同的),然后推回分叉仓库中的同一分支,然后我可以更新其他机器在工作/家里。我或者最终得到一个独立的头或者说有一条消息说我不在分支机构工作。

重现的步骤:

# Fork the repository: https://github.com/angular-university/angular-material-course.git

# Clone the repository on my local machine
git clone https://github.com/<myusername>/<forked repository name>

# Checkout the branch that I want
git branch -a

# See the list
git checkout -b branchname

# Make modifications
git push origin localbranch:remotebranch

我正在尝试的策略或我正在使用的命令是否存在明显错误?

0 个答案:

没有答案
相关问题