5

If git merge automatically performs a commit to the main branch, how do we add a message to that commit?

Comments
  • 2
  • 2
    @electrineer I could have, but unlike endless autogenerated listicle "top ten" garbage results from search engines, and stack overflow fights over decorum--unlike those, most of you here are actually competent.
  • 1
    The first answer on SO is the one you're probably looking for when you ask that question, and the second answer is the one you ideally should be using. Your hatred on SO was unfounded.
  • 0
    @electrineer not entirely. The battle over rules lawyering on SO is real.
    Thank you for the help fwiw.

    Heres a more significant question:
    Is it normal to merge to origin/local master, and *then* push, or is standard practice to work on a local branch, and then push the local branch to the same branch on remote?

    Also I take it a push to a branch on remote, does a merge on remote?
    Or is that what a pull request is?

    I have so many questions and I'm an utter child at this shit.
  • 1
    @Wisecrack pushing your branch on remote and merging it in pull request (after it's reviewed) is the typical practice when you're not working alone.
  • 3
    Why people throw them selves at git like it's simple to hack around google searches beats me.

    Spend some quality time learning it.
    https://git-scm.com/book/en/v2

    If You haven't pushed the commit yet, --amend may be of use to you.
  • 2
    I didn't knew before that we can use devRant as stackoverflow too.
  • 1
    @Survivor you wound me sir!
  • 2
    I'm a drunken idiot half the time. What's this about us being competent?
  • 2
    @atheist and I'm an idiot sober!

    Welcome to the club my dude.
  • 1
  • 1
    Squash merge?
  • 1
    Merge ! why would you want to do such a horrible thing.

    #rebase for life
  • 1
    @Wisecrack and to answer your question, you could --amend the commit
  • 1
    @coldfire for real though? Do people rebase frequently over merging, or are you just *freebasing* here?
  • 1
    I've worked at places that preferred rebasing over merging, makes code review more representative of what's actually going in, but also means there can be a bit of a race to push to trunk
Add Comment