Skip to content

Instantly share code, notes, and snippets.

@1forh
Last active June 1, 2018 18:37
Show Gist options
  • Select an option

  • Save 1forh/3eba2c92bf9a7f0388cbc890999dc0e4 to your computer and use it in GitHub Desktop.

Select an option

Save 1forh/3eba2c92bf9a7f0388cbc890999dc0e4 to your computer and use it in GitHub Desktop.
Autocomplete Git commands in terminal
  1. Run in intermal: curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
  2. Run in terminal: code ~/.bash_profile
  3. Add to .bash_profile:
if [ -f ~/.git-completion.bash ]; then
  . ~/.git-completion.bash
fi
  1. Run in terminal: source ~/.bash_profile
@ryanschmidt
Copy link

ryanschmidt commented Jun 1, 2018

So good. git pull origin na + TAB = git pull origin name-of-branch

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