Reputation: 26124
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?
Upvotes: 0
Views: 1710
Reputation: 179
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
Upvotes: 1
Reputation: 2026
Something like this:
git checkout feature_1 git merge bug_fix_1 git merge feature_2
Or am I missing something?
Upvotes: 0