Difference between revisions of "Git"
From Lofaro Lab Wiki
(→Tab completion on Mac) |
(→Tab completion on Mac) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=Tips and Tricks= | =Tips and Tricks= | ||
== Tab completion on Mac == | == Tab completion on Mac == | ||
− | <syntaxhighlight lang=' | + | <syntaxhighlight lang='bash'> |
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash | curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | add the following to ~/.bash_profile | + | add the following to '''~/.bash_profile''' |
− | <syntaxhighlight lang=' | + | <syntaxhighlight lang='bash'> |
if [ -f ~/.git-completion.bash ]; then | if [ -f ~/.git-completion.bash ]; then | ||
. ~/.git-completion.bash | . ~/.git-completion.bash | ||
fi | fi | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | re-source your '''~/.bash_profile''' or open a new terminal. | ||
+ | |||
+ | Done. |
Latest revision as of 14:39, 1 March 2015
Tips and Tricks
Tab completion on Mac
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
add the following to ~/.bash_profile
if [ -f ~/.git-completion.bash ]; then . ~/.git-completion.bash fi
re-source your ~/.bash_profile or open a new terminal.
Done.