0

I have a git branch starting from a very old version :

V.11 -> V.12 -> V.13 -> V.14 -> V.15 -> V.16 (project/develop)
          \-> feature/MyBranch

MyBranch is created from version 12. I made a commit but before merge and now I want to test my code with modifications from branch develop.

How can I properly get modifications from version 16 in MyBranch ?

A.Pissicat
  • 3,023
  • 4
  • 38
  • 93

1 Answers1

1

You feature branch is very old, so you should a precautionary workflow as follow (due to prabable conflicts):

git checkout feature/MyBranch
git merge --no-commit project/develop # Merge without commit!

# Review changes and accept/edit/reject some of them...

git commit # No comment required
Antonio Petricca
  • 8,891
  • 5
  • 36
  • 74
  • Thank you for answer, what is the difference between the merge and the rebase (saw in Romain Valeri comment) ? – A.Pissicat Sep 07 '21 at 08:44
  • 1
    The rebase move your commits on top of the branch, probably generating conflicts. Merge do a merge of changes (without any commit) which you can review, accept or reject. – Antonio Petricca Sep 07 '21 at 08:45
  • @A.Pissicat https://stackoverflow.com/q/16666089/7976758 Found in https://stackoverflow.com/search?q=%5Bgit%5D+difference+between+merge+rebase – phd Sep 07 '21 at 11:18