Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 314966

Summary: Warning issued while committing
Product: Community Reporter: Antoine Toulmé <antoine>
Component: GitAssignee: Eclipse Webmaster <webmaster>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Antoine Toulmé CLA 2010-05-28 19:27:22 EDT
This must be my fault in the way I set up my repo, so hopefully resolving this will help others:

I get this warning whenever I push:
16:24:49~/w/git/bpmnmodeler:master*&#8593;>git push origin master
Counting objects: 7, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 1.97 KiB, done.
Total 4 (delta 2), reused 0 (delta 0)
warning: updating the current branch
warning: Updating the currently checked out branch may cause confusion,
warning: as the index and work tree do not reflect changes that are in HEAD.
warning: As a result, you may see the changes you just pushed into it
warning: reverted when you run 'git diff' over there, and you may want
warning: to run 'git reset --hard' before starting to work to recover.
warning: 
warning: You can set 'receive.denyCurrentBranch' configuration variable to
warning: 'refuse' in the remote repository to forbid pushing into its
warning: current branch.
warning: To allow pushing into the current branch, you can set it to 'ignore';
warning: but this is not recommended unless you arranged to update its work
warning: tree to match what you pushed in some other way.
warning: 
warning: To squelch this message, you can set it to 'warn'.
warning: 
warning: Note that the default will change in a future version of git
warning: to refuse updating the current branch unless you have the
warning: configuration variable set to either 'ignore' or 'warn'.
To ssh://atoulme@git.eclipse.org/gitroot/bpmnmodeler
   5887807..cfbfefc  master -> master

Any insight as to what is happening ?
Comment 1 Antoine Toulmé CLA 2010-06-03 17:57:41 EDT
I did a bit of reading and this is happening because I wasn't using a bare repository.

Here is the ref to the doc for more info.
http://progit.org/book/ch4-2.html
Comment 2 Denis Roy CLA 2010-06-04 10:46:21 EDT
Ah, thanks for reporting the fix.