Skip to content

Instantly share code, notes, and snippets.

@nysalor
Created October 10, 2014 12:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nysalor/9c984314eb12e4b441b0 to your computer and use it in GitHub Desktop.
Save nysalor/9c984314eb12e4b441b0 to your computer and use it in GitHub Desktop.
#!/bin/sh
date=`date "+%Y%m%d-%H%M%S"`
branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')
host=`hostname -s`
git checkout -b "wip-${date}"
git add .
git add -u
git commit -m "[WIP] temporary commit from ${branch} on ${host}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment