If you do come up with a reasonably simple script for this purpose, it maybe worth proposing to the Git-List for possible inclusion in the /contrib part of the git hierarchy as part of being inclusive of other folks problems ;-)
Some times the list can be dismissive of some real world problems because 'they are doing it wrong', while the different workflows create these unexpected issues (such as yours). On Thursday, November 19, 2020 at 5:35:05 AM UTC Tassilo Horn wrote: > Philip Oakley <philip...@iee.email> writes: > > >> That's a good starter, although I'd rather have a less precise > >> solution which doesn't require that I've already done and committed > >> my changes, i.e., I'd rather run the script *before* I start changing > >> anything. So maybe something along these lines. > > I know the 'before' feeling (!), but isn't that one of the 'git smells' > > (like code smells..) where we should be using a quick temporary branch > > for a side commit, or a WIP-on-top (almost the same as a stash) so that > > you do have a temporary local revision (blobs/trees/commit) stored > > *early*, just in case of mistakes. > > Yes, in general, I agree. However, the purpose of the script in > question is more like this: > > 1. I find some smelly code and I'm tempted to refactor it. > 2. I run my script which tells me quickly that my colleagues on the > other team already changed major parts of it on their feature branch. > 3. Because of that, I spin off a short-lived temporary branch from their > feature branch, do the refactoring there, and open a PR for them to > review. > > I can only see benefits. It costs me just some seconds to find out that > my intended changes would create much less friction if I just base them > on work of another team and so I do. > > Bye, > Tassilo > -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/git-users/120e8a75-03b4-4b9a-b02e-8dc813b8c0bbn%40googlegroups.com.