title: Why does "git status" show I'm on the master branch and "git branch" does not in a newly created repository?
body: <p>I'm trying to automate a process and issue the <code>git branch</code> command to find out what branch I am on. Everything is working fine except for a newly initialized repo where <code>git branch</code> returns nothing. Given I've done nothing with the repo, not even the initial commit, I can accept the answer. However, if I run a <code>git status</code> it tells me I'm on the <code>master</code> branch, as seen here:</p>
  
  <pre><code>$ mkdir todelete
  $ cd todelete
  $ git init
  Initialized empty Git repository in /u/u70021a/todelete/.git
  $ git status
  On branch master
  
  No commits yet
  
  nothing to commit (create/copy files and use "git add" to track)
  $ git branch
  $
  </code></pre>
  
  <p>Am I doing something wrong? Is there some setting I haven't set properly?</p>
  
  <p>I also have a number of new people to Git and I can't explain to them why the command to show which branch they are on shows nothing, yet the status command does.</p>