Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

1
  • Regarding your edit, commits aren't "on" or "in" branches. Git calls all the various ways to refer to commits "references", and "a branch" in git is just "a branch tip reference", a label for a currently-particular commit. You can rehang the label anywhere you like, at any time. When you do a git commit, git rehangs the HEAD reference, and that's it. Really. A huge portion of the confusion around git derives from people's preconceived notion that this has to be hard or complicated. It's not. It's simple. What you can do with it gets complicated, but that's the job, not the tool. Commented Oct 28, 2016 at 21:39