如何从另一个分支获取更改 [英] How to get changes from another branch

查看:53
本文介绍了如何从另一个分支获取更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆