0

We have got a branch called master (Production) and another called development1 development2 development3 development4 ....

On development1 branch created a directory BUGFIX_7869 to and committed the changes. Later realized that this BUGFIX_7869 has to created on development4 branch.

How to move BUGFIX_7869 directory from development1 to development4 branch and remove the BUGFIX_7869 history from development1 branch.

New to GIT and read so many articles around but no able to achieve this.

Filburt
  • 17,626
  • 12
  • 64
  • 115
  • possible duplicate of [How to move certain commits to another branch in git?](http://stackoverflow.com/questions/2369426/how-to-move-certain-commits-to-another-branch-in-git) – Chris Maes Sep 26 '15 at 07:42
  • Your terminology is not very clear. does "I created a directory on branch development1" mean "I made a commit on branch development1 (in which you add a directory"? In that case, look at the related question for the use of "rebase --onto" – Chris Maes Sep 26 '15 at 07:43

1 Answers1

0

Maybe try this way, Find commit with BUGFIX_7869, and switch to development4 and use command:

git checkout development4
git cherry-pick COMMIT_HASH_WITH_BUGFIX_7869
MariuszS
  • 30,646
  • 12
  • 114
  • 155