Run the following:
$ curl -L https://raw.github.com/git/git/master/contrib/completion/git-prompt.sh > ~/.bash_git
And add this to the top of your ~/.bashrc
:
source ~/.bash_git
Re-login to your shell and you should be set.
More Related Contents:
- Command substitution: backticks or dollar sign / paren enclosed? [duplicate]
- Bash conditional based on exit code of command
- How do I check if a directory exists or not in a Bash shell script?
- run bash command in new shell and stay in new shell after this command executes
- Expansion of variables inside single quotes in a command in Bash
- Reading quoted/escaped arguments correctly from a string
- Can a shell script set environment variables of the calling shell? [duplicate]
- How to add a progress bar to a shell script?
- What is the purpose of “&&” in a shell command?
- How can I remove the extension of a filename in a shell script?
- How do I escape the wildcard/asterisk character in bash?
- How can I count all the lines of code in a directory recursively?
- How does Ctrl-C terminate a child process?
- printf in bash: “09” and “08” are invalid numbers, “07” and “06” are fine
- Concatenating multiple text files into a single file in Bash
- String comparison in bash. [[: not found
- How to Batch Rename Files in a macOS Terminal?
- How to pass arguments to Shell Script through docker run
- How do I pause my shell script for a second before continuing?
- How do you echo a 4-digit Unicode character in Bash?
- Print a character repeatedly in bash [duplicate]
- Forking / Multi-Threaded Processes | Bash
- Docker: How to use bash with an Alpine based docker image?
- How to get the list of files in a directory in a shell script?
- Bash shell Decimal to Binary base 2 conversion
- Convert line endings [duplicate]
- VSCode Integrated Terminal Doesn’t Load .bashrc or .bash_profile
- How to substitute quoted, multi-word strings as arguments?
- BASH: Writing a Script to Recursively Travel a Directory of N Levels
- How to grep for case insensitive string in a file?