× {{alert.msg}} Never ask again
Get notified about new tutorials RECEIVE NEW TUTORIALS

Enable git auto complete in your bash terminal

Federico Ulfo
Mar 04, 2016
<p>Do you want to have a git autocomplete functionality in your bash terminal, so that you can type, <em>git chec</em> than press tab and complete to <em>git checkout</em> , then press again tab and see the list of available branches, start typing ma, click tab and complete to master?<br> <br> Add the following into your ~/.bash_profile:</p> <pre># git auto completition if [ -f ~/.git-completion.bash ]; then . ~/.git-completion.bash fi</pre> <p>Then download the following the .git-completion.bash file from here:<br> https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash<br> <br> Do as follow:</p> <pre><code class="language-bash">wget https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash ~/ mv ~/git-completion.bash ~/.git-completion.bash </code></pre> <p><br> Now you can close your terminal, open it again, and you'll have enabled git autocomplete.<br> <br> Feel free to contact me for any question!<br> <br>  </p>
comments powered by Disqus