Skip to content

Comment on Minimum Viable Git for Trunk-Based Developmentparent

Comments

Because they do different things. It's right there in his post:

# adds my single commit to the end of the current main

The biggest benefit to this IMO is that you can resolve conflicts in YOUR branch, get it all cleaned up, and then when you merge there are no conflicts. This allows you to test any changes made during conflict resolution in your feature branch still.

No, if you want to update your local branch first then the correct way to do that would be to run:

    $ git checkout feature-branch
    $ git merge main
    # test stuff, make sure everything looks good
    $ git checkout main
    $ git merge feature-branch --no-ff
No rebasing or other history rewrites required.
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.