Skip to content

Instantly share code, notes, and snippets.

@0xferit
Created August 30, 2017 19:47
Show Gist options
  • Save 0xferit/7d7c2c5807670032836be601342e2473 to your computer and use it in GitHub Desktop.
Save 0xferit/7d7c2c5807670032836be601342e2473 to your computer and use it in GitHub Desktop.
#!/bin/bash
for rev in $(git rev-list --reverse origin/master..HEAD);
do
git push -f origin ${rev}:master
done
@0xferit
Copy link
Author

0xferit commented Sep 18, 2017

shopt -s globstar
for fileToCommit in ./**/*; do
test -f "$fileToCommit" || continue
printf "%s\n" "${fileToCommit}"
git add "${fileToCommit}"
git commit -m "initial commit ${fileToCommit}"
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment