Skip to content

Instantly share code, notes, and snippets.

@haani-niyaz
Last active August 29, 2015 14:24
Show Gist options
  • Save haani-niyaz/35c9564fa313af4c854e to your computer and use it in GitHub Desktop.
Save haani-niyaz/35c9564fa313af4c854e to your computer and use it in GitHub Desktop.
Create an alias to a git branch
# Alias for remote branch (f1 tracks feature_1)
git checkout --track -b f1 origin/feature_1
# To enable push/pull to remote tracking branch (enables local(alias) branch to push to remote branch)
git config push.default upstream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment