Skip to content

Instantly share code, notes, and snippets.

@ricokareem
Forked from wookimiii/grco.bash
Last active January 1, 2016 19:19
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 ricokareem/8189459 to your computer and use it in GitHub Desktop.
Save ricokareem/8189459 to your computer and use it in GitHub Desktop.

Make this file executable and add it to your path

Usage

grco [some-text]
#!/bin/bash
BRANCH=$(git branch -a | grep $1 | head -n 1 | awk '{ gsub(/remotes\/origin\//,""); print}')
git checkout $BRANCH
@wookimiii
Copy link

what does the awk do?

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