如何从另一个分支获取更改 [英] How to get changes from another branch
问题描述
我目前在featurex
分支上工作.我们的主分支名为分支our-team
.自从我开始研究featurex
以来,对分支our-team
进行了更多更改.在推送featurex
进行合并之前,我想在本地将所有内容从our-team
分支转移到featurex
,以便确保一切都能按预期进行.
I am currently working on featurex
branch. Our master branch is named branch our-team
. Since I started working on featurex
, more changes have been made to branch our-team
. Before I push featurex
for merging, I would locally like to get all changes from our-team
branch into featurex
so that I can ensure everything works as expected.
我已在本地完成此操作,以便从our-team
获取所有最新更改.
I have done this locally to get all the latest changes from our-team
.
git checkout our-team
git pull
我该怎么做?
推荐答案
您可以使用 rebase ,例如git rebase our-team
,当您在分支featurex
You can use rebase, for instance, git rebase our-team
when you are on your branch featurex
它将分支的起点移动到our-team
分支的末尾,并合并featurex
分支中的所有更改.
It will move the start point of the branch at the end of your our-team
branch, merging all changes in your featurex
branch.
这篇关于如何从另一个分支获取更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!