Q:

Multiple repositories, divergent sources

My source code is common across 2 remote repo (one for production and one for backup purpose) and I would like to add a folder specifically on my backup repo and not the other (and be able to get it from this repo on any computer without pushing it on the production repo). Is it possible to do that with git workflow ?

A:

Here is what I would do

On the backup repo, create a new branch, say with_folder, branching out from the main master branch
Make changes to your with_folder branch for any changes related to your code in the extra folder.
Periodically rebase this branch on master

So, your flow becomes like

git checkout master && git branch with_folder
Work on master branch for changes related to master branch
git checkout with_folder && git rebase master to bring your with_folder up to date with code from master branch
Since the branch with_folder contains contains changes specific to the folder, there will never be any merge/rebase conflicts
Make changes to the folder, commit using git add folder && git commit -m "msg"
Continue working on your master after doing git checkout master

