Skip to content

Instantly share code, notes, and snippets.

@martimatix
Created June 3, 2018 07:02
Show Gist options
  • Save martimatix/66851f16067995dc9af04378785ed6bd to your computer and use it in GitHub Desktop.
Save martimatix/66851f16067995dc9af04378785ed6bd to your computer and use it in GitHub Desktop.
checkout
#!/bin/bash
echo "determining branch"
branch=`git branch | sed -e s/^\.\ // | grep $1`
echo "checking out $branch"
git checkout $branch
@martimatix
Copy link
Author

Put in ~/bin/checkout

@martimatix
Copy link
Author

Then run $ chmod +x ~/bin/checkout

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