Skip to content

Instantly share code, notes, and snippets.

@Fastjur
Created June 7, 2016 11:48
Show Gist options
  • Save Fastjur/64b972e5e3ef3d2c725a94f8aa255e12 to your computer and use it in GitHub Desktop.
Save Fastjur/64b972e5e3ef3d2c725a94f8aa255e12 to your computer and use it in GitHub Desktop.
A bash script that makes a random branch and file and pushes this to origin.
gitbehind() {
TIME=$(date +%s);
git checkout -b $TIME;
git checkout $TIME;
echo $TIME >> $TIME.file;
git add $TIME.file;
git commit -m "Behind Commit";
git push -u origin $TIME;
git checkout master;
git branch -D $TIME;
}
export -f gitbehind
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment