0

Yes I need to backup my local repo in remote repo and there are no collaborators.

I use git push origin --mirror

However there is slight problem( as I read it in Is "git push --mirror" sufficient for backing up my repository? ): It overwrites everything from local repo to remote. I guess if my local repo is corrupted, same will be transferred to the remote.

I don't want it. I want to push incremental changes as done in any incremental backup. The should be pushed on the top, preserving historical data.

What is the way to do it using git?

user5858
  • 1,082
  • 4
  • 39
  • 79

1 Answers1

0

I would suggest

git push --all --tags -f

the -f will make it possible to remove stuff (if you've done a rebase). However things will be removed totally after 14 days and before that just being invisible

iveqy
  • 19,951
  • 1
  • 15
  • 20