0

in Gitlab:

  1. Created a new branch called xxx from prod.
  2. Coding in the XXX(2 changes)
  3. Created a new branch called merge_XXX_dev from dev.
  4. Pull from XXX to merge_XXX_dev and commit the changes(2 changes)
  5. Created a MR (merge_XXX_dev to dev) and ask other team to admit it (2 changes)

2 Days later when my MR turns there were 194 changes in my MR(during the 2 Days other team’s changes appeared too)

I want to know the reason and how to avoid it again.

Can anyone help?

Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
  • 2
    What does "when my MR turns" mean? Was it merged, rebased, or something else? From which branch(es)? – underscore_d Jun 09 '20 at 09:03
  • Thanks for the help. I have to ask the MR team(which responsible for admit merge request) to merge my changes from 'merge_xxx_dev' branch to the 'dev' branch. There's a lot MR to ask the MR team to admit. for example, my MR is NO.123,the MR team has to admit NO.1~NO.122 then my MR turns. Now the problem is when i create the MR, there's only my changes(2 changes), But 2Days later when the MR team see,there's 194 changes(include NO.1~NO.122's changes) – chen0814 Jun 10 '20 at 01:07
  • So you mean when it's that MR's "turn" to get reviewed :-) It sounds like you just need to rebase your MR on top of the target branch `dev`. Otherwise its changes will be to cancel out whatever other users have done since you originally made your commits. – underscore_d Jun 10 '20 at 08:29
  • The problem is I don't know when the MR team admit my MR, I can make sure my MR is the top of the target branch dev when I create it, but the time of MR team review it is out of my control. – chen0814 Jun 10 '20 at 10:04
  • What is "admit an MR"? Do you mean "submit" or do you mean "approve"? – knittl Jun 11 '20 at 07:20
  • yeah,"admit an MR" means "approve" – chen0814 Jun 12 '20 at 01:26
  • I found that there's two version in my MR,but it only had been changed once. and the strange thing is the two version have the same hash. (the hash which should have 2 changes) version 1 is my changes, latest version include 3month earlier's changes, 5month earlier's changes, even 7month earlier's changes – chen0814 Jun 12 '20 at 01:33

0 Answers0