Hacker News new | past | comments | ask | show | jobs | submit login

I meant, "what are you setting out to do?" as in "I'm trying to reorder commits" not "I'm trying to `git rebase -i commit`" (the ultimate aim, rather than the path you choose). My instinct is that you can get where you want to go fairly easily with the `git rebase -i --root` I mentioned earlier.



If you plant a NIL commit in your repo before doing anything else, and tag it as NIL, then absolutely all git commands that take a ref (including ones you don't even know yet) will Just Work without any special arguments or modifications for the root case. You don't need to memorize yet more special cases for yet one more corner case in git.

In existing old repos or other people's repos that do not have NIL, I don't need it, because I won't be rewriting their history (let alone all of it back from the empty state!)

It's handy, when a repo is brand new, to be able to massage the newly created master branch using the same workflows that are rehearsed daily, rather than special cases.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: