News for hackers. Stuff that matters.
Re:Some bad Git situations and how I got myself out of them by l0b0 on Friday September 09, 2016 @04:57AM (#12460539)
`git rebase -i` by default rebases only back to the first commit you haven't shared (at least that's how I interpret the actual behaviour). This is a great default - it's the simplest way to change history and at the same time powerful without being too dangerous.
Re:Some bad Git situations and how I got myself out of them by ZeroGravitas on Friday September 09, 2016 @05:34AM (#12460670)
Ah, interesting. I'd noticed this behaviour but hadn't conciously thought about it.

The docs say:

All changes made by commits in the current branch but that are not in <upstream> are saved to a temporary area. This is the same set of commits that would be shown by git log <upstream>..HEAD

Re:Some bad Git situations and how I got myself out of them by mcv on Friday September 09, 2016 @07:33AM (#12461171)
If they're not in upstream but they are in another branch, it's still dangerous.
Re:Some bad Git situations and how I got myself out of them by majewsky on Friday September 09, 2016 @08:34AM (#12461526)
Well yeah, sometimes this power is needed. For example, I might need to do a rebase over published history to remove a patch that was found to be a copyright infringement.
Re:Some bad Git situations and how I got myself out of them by phaemon on Friday September 09, 2016 @09:50AM (#12462145)
I don't understand. Could you give an example?