0

I have been working with git in Mac and creating/deleting/moving to the branches lot so this command irks me -

git checkout <some branch>

I want to do like this git checkout type some letters, then tab to get the name of some branch and checkout in the branch.

Is that possible?

For example,

  debug_print
* develop
  master

I'll do like this -

git checkout deb

and then tab it to get all of the remaining name of branch but the terminal shows like I'm losing some HP (white flashes on terminal).

Then, I have to type whole thing -

git checkout debug_print
phd
  • 82,685
  • 13
  • 120
  • 165
Meep
  • 501
  • 6
  • 24
  • 1
    Do you have git tab completion installed? What's the output of `complete -p git`? – Benjamin W. May 13 '19 at 17:15
  • No, I don't think so, I didn't know there is git tab completion installed. How do I install it? -bash: complete: git: no completion specification – Meep May 13 '19 at 17:25
  • It gets installed with git itself, but you have to add something to your shell startup files. [These instructions](https://github.com/bobthecow/git-flow-completion/wiki/Install-Bash-git-completion) look like they should work. – Benjamin W. May 13 '19 at 17:37
  • https://stackoverflow.com/search?q=%5Bbash%5D+%5Bgit%5D+install+completion – phd May 13 '19 at 19:16
  • yes, it will be good to redirect this question to that question. I didn't know what is the term to have that feature. Thank you! – Meep May 13 '19 at 19:51

0 Answers0