On Sat, Feb 08, 2020 at 09:46:53AM +1030, Alan Modra wrote: > On Fri, Feb 07, 2020 at 10:08:25AM +0000, Jonathan Wakely wrote: > > With Git you can't really have unwanted local commits present in a > > tree if you use a sensible workflow, so if you tested in a tree that > > was at commit 1234abcd and you push from another machine that is at > > the same commit, you know there are no unintended differences. > > Maybe I don't have a sensible workflow, but often with lots of tiddly > little binutils patches I don't bother with branches for everything.
Yup, same here. And I sometimes "git revert" some of the patches I have in my "work" tree to be able to test other patches, while making it easy to get things back. To prevent "death by a thousand branches" syndrome. Apparently you can do similar with "git stash", but I never got the hang of that. Sometimes I revert a revert of a revert. That's probably too much though :-) > Some of those patches tested might not be ready for commit upstream > (lacking comments, changelogs, even lacking that vital self review), > so I'll "git rebase -i" to put the ones that are ready first, then > "git push origin <commit id>:master" > just to push up to the relevant commit. That works quite well for me. I only ever push from master (or some other local tracking branch), and never commit to those tracking branches other than immediately before pushing. This prevents mistakes. Segher