Skip to content

Instantly share code, notes, and snippets.

@MaraScott
Created January 21, 2020 14:14
Show Gist options
  • Save MaraScott/0a1d2c2067ef61c84cc914b1307b8b2f to your computer and use it in GitHub Desktop.
Save MaraScott/0a1d2c2067ef61c84cc914b1307b8b2f to your computer and use it in GitHub Desktop.
re-execute all commit line per line from beginning to push on a remote repo
git rev-list --reverse master | ruby -ne 'i ||= 0; i += 1; puts $_ if i % 1 == 0' | xargs -I{} git push other_remote +{}:refs/heads/other_branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment