title: "You are not currently on a branch" error when trying to sync fork with upstream repository
body: <p>I made <a href="https://github.com/BioGeek/biopython" rel="nofollow noreferrer">a fork of a GitHub repository</a>. I fixed <a href="https://github.com/biopython/biopython/issues/1402" rel="nofollow noreferrer">a bug</a>, wrote a test and created <a href="https://github.com/biopython/biopython/pull/1429" rel="nofollow noreferrer">a pull request</a> which was <a href="https://github.com/biopython/biopython/commit/1a32c50fb91b9461eb4c0d0d427823dca81b41ee" rel="nofollow noreferrer">merged</a> into the original repository. </p>
  
  <p>So far, so good. </p>
  
  <p>Now I improved the test on my local machine. I want to create a new pull request with this improved test. But in the meantime, other commits have been made to the original, upstream repository. So I want to get my fork into sync with the upstream repository so that I can create the new pull request.</p>
  
  <p>Without fully grasping what I was doing, I've been copy/pasting git commands from other StackOverflow answers. But I can't get it to work. </p>
  
  <p>Here is what the situation currently looks like:</p>
  
  <pre><code>$ git push
  fatal: You are not currently on a branch.
  To push the history leading to the current (detached HEAD)
  state now, use
  
      git push origin HEAD:&lt;name-of-remote-branch&gt;
  $ git status
  rebase in progress; onto 4378fa4
  You are currently rebasing branch 'master' on '4378fa4'.
    (all conflicts fixed: run "git rebase --continue")
  
  Untracked files:
    (use "git add &lt;file&gt;..." to include in what will be committed)
  
          Tests/.vscode/
  
  nothing added to commit but untracked files present (use "git add" to track)
  </code></pre>
  
  <p>Or visually:</p>
  
  <pre><code>$ git log --all --graph --pretty=format:'%C(auto)%h%C(auto)%d %s %C(dim white)(%aN, %ar)'
  * 46f5c0e (HEAD) Change to non-UTF8 locale C (ASCII only) inside test (BioGeek, 3 hours ago)
  | *   fe24176 (master) merge changes from upstream (BioGeek, 3 days ago)
  | |\
  | |/
  |/|
  * | 4378fa4 (upstream/master) Thank Jerven for ExPASy URL updates (Peter Cock, 3 days ago)
  * | 03de45c Update ExPASy tests for HTTPS (Peter Cock, 3 days ago)
  * | 47cdbf7 Move expasy URLs to https (Jerven Bolleman, 4 days ago)
  * | 9bfb8b1 replace expasy.ch by expasy.org (Jerven Bolleman, 4 days ago)
  * | 1a32c50 Determine encoding for urllib handles from HTTP headers (Jeroen Van Goey, 3 days ago)
  * | ccf88fc Tests do not require postgresql CREATE DATABASE permissions (Adhemar Zerlotini, 3 days ago)
  | | *   6b7d235 (refs/stash) WIP on master: 6311677 remove Doc/examples/tree1.nwk which was committed accidentally (created during testing?) (BioGeek, 3 days ago)
  | | |\
  | |/ /
  | | * 4ead5fa index on master: 6311677 remove Doc/examples/tree1.nwk which was committed accidentally (created during testing?) (BioGeek, 3 days ago)
  | |/
  | * 6311677 (origin/master, origin/HEAD) remove Doc/examples/tree1.nwk which was committed accidentally (created during testing?) (BioGeek, 3 days ago)
  | * 41ff4cc Address flake8 warnings (BioGeek, 3 days ago)
  | * 815bbfd Add encoding and prefic unicode string with 'u' (BioGeek, 3 days ago)
  | * 0e7451d If the handle has a headers attribute, then use it's content charset as encoding. Otherwise fall back to the default behaviour. (BioGeek, 4 days ago)
  | * 6a7d05b Add test for correct handling of encodings in Entrez.efetch. Also add some missing docstrings in other tests and close handles everywhere (BioGeek, 4 days ago)
  |/
  * 4ccdace mmCIF parser fix to check for both '?' and '.' as unassigned values (Joao Rodrigues, 5 days ago)
  </code></pre>
  
  <p>Changeset <code>46f5c0e</code> is the improved test from which I want to create a new pull request.</p>
  
  <p>How do I get to sync my fork with the upstream repository so that I can create the new pull request?</p>