git-sync
git-sync copied to clipboard
WIP: Add support for extra-sync - extra branches to sync with.
(this builds on my earlier PR - let's land that and then I'll rebase this on top of it. I'm only creating this now in order to give a preview of where this is going)
I've got a repo of text files that I edit from many machines.
Each machine has its own branch that only it edits. For that branch, the usual sync operation should always succeed.
I also try to keep origin/master up-to-date with whichever branch was edited most recently. Sometimes this fails - usually because I've made conflicting edits on two machines while they were offline, and so manual intervention is needed to resolve the conflict.
This change adds this ability into git-sync. It looks for a list of extra branches to sync with in branch.$branch_name.extra-sync. If this is found, the same sync logic is used for each of those in turn, after the main upstream branch is synced
If no extra-sync option is specified, the behaviour here should be identical to the existing script.
Which means that this needs to split into two changes: one to incorporate the "-q"s I've added, and a second to add extra-sync
I'm thinking that the -qs should be toggleable; either default-on (to preserve current behaviour) or default-off (to make the output more human-useful), but with the option to flip to the other setting (because even if you don't normally want to see all the output, sometimes it's handy)
Hi James,
I just noticed we never got back to this. Your earlier changes did indeed land, you may rebase now ;)
More seriously, I still think this would be a great contribution. Let me know if you intend to pick up on this!