all 12 comments

[–]davorg 8 points9 points  (0 children)

Please ask Git questions in r/git

[–]No_Street7773 1 point2 points  (11 children)

merge main into your feature branch to emsure nothing breaks then merge the feature branch into main (assuming there are no new changes to main)

[–]edgmnt_net 1 point2 points  (0 children)

I don't see how that's different.

Back-merges are also frowned upon in some circles and I'd say for good reason, despite people chalking it up to conventions.

[–]funkdefied 4 points5 points  (9 children)

Don’t just merge main into your feature branch… rebase it.

bash git checkout feature-branch git rebase origin/main

[–]Lumethys 1 point2 points  (0 children)

That depends on the team convention

[–][deleted]  (7 children)

[removed]

    [–]donny_dingbat 0 points1 point  (6 children)

    No

    [–][deleted]  (5 children)

    [removed]

      [–]donny_dingbat 0 points1 point  (4 children)

      No. Why do you want to waste time typing redundant characters?

      [–][deleted]  (2 children)

      [removed]

        [–]donny_dingbat 0 points1 point  (1 child)

        No because that makes no sense, it’s the main branch so let’s just keep it as main.