简体   繁体   中英

Move changes from master to develop branch (using GIT)

The way I use GIT when developing a new feature or fixing a bug is to create a new branch from the master branch to work on then, once I have finished developing on that branch, merge it back into the master branch.

Now, lets say I have the master , bug_fix_1 , feature_1 and feature_2 branches. The development of feature_1 has been put on the back-burner because feature_2 became a priority. The bug_fix_1 has now been fixed and merged back into master. The feature_2 branch has also now been completed and merged back into master. As a result I have deleted both these branches and am now left with master and feature_1.

How do I get the changes from bug_fix_1 and feature_2 (now in the master branch) into the feature_1 branch?

You already merged bug_fix_1 and feature_2 branches with master ,

then your master has all the changes from bug_fix_1 and feature_2

git checkout feature_1

git merge master

Something like this:

 git checkout feature_1 git merge bug_fix_1 git merge feature_2 

Or am I missing something?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM