Skip to content

Instantly share code, notes, and snippets.

@sammso
Last active January 21, 2018 11:36
Show Gist options
  • Save sammso/fefc81e0f6ef5cfef575da181bc96653 to your computer and use it in GitHub Desktop.
Save sammso/fefc81e0f6ef5cfef575da181bc96653 to your computer and use it in GitHub Desktop.

Huge github push

Below the master is the branch and change that to correct one.

max=$(git log --oneline|wc -l); for i in $(seq $max -500 1); do echo $i; g=$(git log --reverse --oneline --skip $i -n1|perl -alne'print $F[0]'); git push origin $g:refs/heads/master; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment