title: get current branch name for use in git command
body: <p>I sometimes want to use the current branch name to use in git commands. For example</p>
  
  <pre><code>git push origin feature/really-long-branch-name
  </code></pre>
  
  <p><strong>Is there a git command that will give just the branch name so I can do something like the following?</strong></p>
  
  <pre><code>git push origin current_branch
  </code></pre>
  
  <p>There is <code>git rev-parse --abbrev-ref HEAD</code> but that's exactly useful in this case. Setting a default branch isn't that helpful either since the branch name changes often. Changing the default behavior of <code>git push</code> isn't what I'm looking for either since it still means having to type in the full branch name the first time I <code>push</code>.</p>
  
  <p>Edit:</p>
  
  <p><strong>Moderators</strong>, this question is not a dupe so please do not close for that reason. Please read the bolded part of my question carefully.</p>