I tend to have long branch names for git (e.g., step110_create_search_engine_to_replace_google).
How should I refer to it simply as step110 in checkout/commit statements?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you’re on a Unix-like system (Linux, Mac OS X, perhaps others), there’s the
contrib/complete/git-completion.bashbash auto-complete ruleset, which will let you auto-complete git commands (you can typegit checkout step110<tab>and your shell will autocomplete the branch-name.To activate this:
contrib/complete/there’s a filegit-completion.bash. Put that somewhere safe (like~/.git-completion), and then add the following line to your~/.bashrcfile:source ~/.git-completion. Either restart your shell session or runsource ~/.git-completionto get it running in the current shell session.If you’re lucky enough to be using
zshinstead ofbash, I know thatoh-my-zshhas git autocompletion plugins (I’m not sure how to activate them withoutoh-my-zsh).Sources: