I was looking for git-bundles as an option to keep my 2 repositories (being continuously worked on) in sync with each other.
Since both are two different geographical locations and setting up a VPN is also not an option I plan to use bundles..(Any other better alternative or method? )
I stumbled upon Jefromi's answer here . It explains things very well.
However if I have multiple branches being worked on and I wanted to update them all, how do I do it?
(The answer uses basis for master but uses --branches that will copy the complete history of all other branches in bundle again. I want only updated/added commits of all braches)
You can create a new backup while excluding what was in the previous backup:
Here you create an incremental backup with incremental history for branches
A
andB
, plus the new branchC
.You can see that approach detailed in "Incremental backups with git bundle, for all branches"
I prefer the simpler approach of using the date of the last backup:
It is ok to backup "a bit more": duplicate commits won't be imported twice when you will use that incremental backup.
I have made a script based on
--since
: save_bundles.