The error message says it all.

The problem is that you have a non-bare repository. You cannot 'push' your 
personal content onto the content of the remote potentially overwriting someone 
elses work.

A bare repository doe not have any work tree with checked out content, so you 
can't over write it!

You can push to a non-checked out branch on a remote as long as it is a fast 
forward (I do it myself on a network drive where other aren't aware of the 
hidden git directory, and only see the perfectly polished results on master;-)

Time for a bit more reading of the man pages, and the tutorials, and user 
guide..

Philip
  ----- Original Message ----- 
  From: Benjamin Fontaine 
  To: git-users@googlegroups.com 
  Sent: Sunday, May 04, 2014 9:51 PM
  Subject: [git-users] Git error on push : refusing to update checked out branch


  Hello and thanks for this group
  I'm new to Git ( I was asked to learn it in my last job interviews, and I've 
configured it this far .. )
  Master on my webserver, did a clone, put both to branch "ben",  did commit, 
and then the push fails



  Any ideas ? 
  Thank in advance for further comments


  -- 
  You received this message because you are subscribed to the Google Groups 
"Git for human beings" group.
  To unsubscribe from this group and stop receiving emails from it, send an 
email to git-users+unsubscr...@googlegroups.com.
  For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to