pages tagged gitbloghttp://blog.spang.cc/tags/git/blogikiwiki2014-03-22T04:46:24Zmanipulating git branches in your local repohttp://blog.spang.cc/posts/manipulating_git_branches/2014-03-22T04:46:24Z2014-03-22T04:46:24Z
<p>From the "git tricks I learned from work" department:</p>
<pre><code>git push . HEAD:<branch-name>
</code></pre>
<p>This will push your current HEAD to a local branch named <branch-name>.
You can also force an update using <code>+</code>, just like when you're
using <code>push</code> to update an actual remote. HEAD can of course
be a more complicated refspec.</p>
<p>You probably don't use git in as crazy ways as my work does, but knowing
that you can use a dot to refer to your local repository in commands
like <code>push</code> can sure come in handy every once in a while,
especially when doing complicated rebases.</p>