How to backup git server? When git server is broken, How can I push my local repository to a new git server?
You can use:
git bundle
That way:
You will for the first backup create a full bundle:
$ git bundle create /tmp/foo-all --all
You back it up like any other server, just mirror the files; git stores its metadata in files like anything else. If you move the repository to a new machine, you need to change your local repository's origin to point to it. In .git/config
you'll find something like:
[remote "origin"]
url = SOMETHING
Change SOMETHING
to the address of your new server
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With