alias g='git' and have bash completion still work
<p>For an alias to <code>git</code> itself, eg. <code>alias g=git</code>, you'll find your answer more easily here.</p>

<p>For <code>git</code> subcommand aliases, eg. <code>alias gco = "git checkout"</code>, look <a href="https://stackoverflow.com/questions/342969/how-do-i-get-bash-completion-to-work-with-aliases">here</a>.</p>

<hr>

<p>I type <code>git</code> far too often, so I've aliased it:</p>

<pre><code>alias g='git'
</code></pre>

<p>However, now I can't do:</p>

<p><code>g com</code><kbd>tab</kbd></p>

<p>and have the completion present me with:</p>

<p><code>g commit</code></p>

<p>How do I get completion running again?</p>

<hr>

<p><strong>Duplicate differentiation</strong></p>

<p>This <a href="https://meta.stackexchange.com/a/213979/336223">equal-first meta answer</a> suggests keeping the specific case with a with a link to the more generic question. I've added the link to the more generic case in this edit.</p>

<p>The asserted duplicate question is more generic - but mostly about aliases to <code>git</code> subcommands, rather than an alias to git itself.</p>

<p>This question is about the specific case where the alias is to <code>git</code> itself.</p>

<p>In the marked duplicate, the <code>git</code>-itself case is only answered in the 4th shown answer, and in a comment to the first listed answer. Reading another comment is required for the second piece of the puzzle (source <code>/usr/share/bash-completion/completions/git</code>) to get it working via that method.</p>

<p>Addressing the links in the comments below:</p>

<ul>
<li>@ewcz's link is the marked duplicate and has already been addressed</li>
<li>Remy J's links

<ol>
<li>This is question as asked (and answered) is also about <code>git</code> subcommands</li>
<li>This is an even more generic question about non-<code>git</code> aliases, which doesn't isn't near to the best solution in this case</li>
<li>This is the same as @ewcz's link (already addressed)</li>
</ol></li>
</ul>