Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How does gickup deal with force pushes to upstream (source)? #234

Open
kravemir opened this issue Apr 19, 2024 · 1 comment
Open

How does gickup deal with force pushes to upstream (source)? #234

kravemir opened this issue Apr 19, 2024 · 1 comment

Comments

@kravemir
Copy link

I am searching for a git backup tool, where I would have confidence, that:

  • what was backed up before, remains backed up after re-execution of the tool:
    • protect against source corruption,
    • new backup doesn't erase history,
    • ability to go back in time is retained even if source repository had purged all/some of its commits,
  • when backup runs, the current state of source is backed up:
    • new backup doesn't fail on conflicts between repository containing the backup, andthe source repository,
    • no manual intervention or conflict resolution is needed.

Does gickup cover the above in any way?

One approach to solve it is to create a new branch with old contents, if default branch force pushed in source repository, and then reset copy to upstream. I.e.:

  1. create main-before-backup-[date-time] from last backed main (default branch),
  2. force push upstream/main to destination/main.

I don't care about specific solution, as long as history is preserved, and backup still continues to function, and doesn't break.

@cooperspencer
Copy link
Owner

cooperspencer commented Apr 22, 2024

It doesn't handle force pushes well yet. One of the next things on my todo list. But what you can do is to enable zip and keep on the local backup. That creates a zip file of your repository and keeps as many backups as you configure. That way you can keep the original state of your repository.

https://cooperspencer.github.io/gickup-documentation/configuration/destination_docu/local

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants