threads / discuss / 47370

git-completion.bash: Show list of local branches instead of refs for git checkout

Subject: git-completion.bash: Show list of local branches instead of refs for git checkout

## tl;dr

2 messages between Dec 4, 2017 and Dec 4, 2017.

replies: 1people: 2as markdown or json

Amandeep Gautam· Dec 4, 2017, 09:10 UTC · lore
Hello,
    I am using git-completion.bash and when I try to checkout a branch
by typing git checkout on the prompt, I get the following:
FETCH_HEAD FETCH ORIG_FETCH

Will it not be more useful if the list of local branches is populated? If it seems like a good idea I will be willing to submit a patch.

Regards, Aman

SZEDER Gábor· Dec 4, 2017, 09:29 UTC · re: Amandeep Gautam · lore

Re: git-completion.bash: Show list of local branches instead of refs for git checkout

Hi,
>     I am using git-completion.bash and when I try to checkout a branch
> by typing git checkout on the prompt, I get the following:
> 
> FETCH_HEAD FETCH ORIG_FETCH

What is "ORIG_FETCH"? This string was never present in Git's source code.

> Will it not be more useful if the list of local branches is populated?

'git checkout <TAB>' should already list branches, and it seems to work just fine.

Gábor

← back to recent threads