josegonzalez/python-github-backup

how to correctly update local backup?

ma-ji opened this issue · 7 comments

ma-ji commented

Hi, I want to update local backup repos, but maybe I'm using the wrong command? Thanks for helping!

The code I'm using: github-backup ma-ji --incremental --token xxx --output-directory ./ --repositories --private --fork --all

After running the command, the local files is still not update to date.

Try without --incremental first

This tool pulls remotes using fetch, so your "local files" won't change until the merge in the remote branch.

ma-ji commented

This tool pulls remotes using fetch, so your "local files" won't change until the merge in the remote branch.

Can explain more about this? How can actually update the local files?

ma-ji commented

Try without --incremental first

Unfortunately, this does not seem to be working.

This tool pulls remotes using fetch, so your "local files" won't change until the merge in the remote branch.

Can explain more about this? How can actually update the local files?

You might need to learn more about how a git repo works under the hood, but you will want to merge in the latest remote branch (which has been fetched via the backup) using git merge {remote}/{branch} or likely git merge origin/master.

This tool pulls remotes using fetch, so your "local files" won't change until the merge in the remote branch.

Can explain more about this? How can actually update the local files?

You might need to learn more about how a git repo works under the hood, but you will want to merge in the latest remote branch (which has been fetched via the backup) using git merge {remote}/{branch} or likely git merge origin/master.

@whwright Can I pass any argument to github-backup command, so it will automatically run git merge {remote}/{branch} for all repositories in my local-backup ?

This tool pulls remotes using fetch, so your "local files" won't change until the merge in the remote branch.

Can explain more about this? How can actually update the local files?

You might need to learn more about how a git repo works under the hood, but you will want to merge in the latest remote branch (which has been fetched via the backup) using git merge {remote}/{branch} or likely git merge origin/master.

@whwright Can I pass any argument to github-backup command, so it will automatically run git merge {remote}/{branch} for all repositories in my local-backup ?

No this is not supported, neither is it necessary. The data is in your local copy of the repo if the tool as been run.