[英]How to pull from remote repo to remote branch
We use git through visualstudio.com.我们通过visualstudio.com使用git。 Each developer has their own branch off master.每个开发人员都有自己的 master 分支。 The usual morning process is:通常的早晨过程是:
I know i can do step 3 via command line.我知道我可以通过命令行执行第 3 步。 Is step 2 possible via command line on my pc, ie pull from remote master to remote branch before pulling the remote branch to my machine?第 2 步是否可以通过我的电脑上的命令行进行,即在将远程分支拉到我的机器之前从远程主控拉到远程分支?
Your workflow is very non standard, and also would be confusing to many seasoned Git users.您的工作流程非常不标准,也会让许多经验丰富的 Git 用户感到困惑。 Here is a better workflow:这是一个更好的工作流程:
# from my_branch
git fetch origin
git merge origin/master
The first git fetch
step will update your local tracking branch origin/master
with the latest changes from the true remote master
branch.第一个git fetch
步骤将使用来自真正远程master
分支的最新更改更新您的本地跟踪分支origin/master
。 Then, also locally, you may merge the latest master
into your feature branch, and go from there.然后,同样在本地,您可以将最新的master
合并到您的功能分支中,并从那里合并 go。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.