What causes this git warning?

Lately whenever I do a git push I get an exchange like this:

owner-pc ~/dev/project $ git push
Counting objects: 15, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 3.15 KiB, done.
Total 8 (delta 6), reused 0 (delta 0)
remote: Pulling changes into edge...
remote: From /var/git/project
remote:  * branch            master     -> FETCH_HEAD
remote: error: Your local changes to 'config/development.php' would be overwritten by merge.  Aborting.
remote: Please, commit your changes or stash them before you can merge.
remote: Updating 1984db9..d584535
remote: Changes have been pulled and applied to edge.
To ssh://dev.trueaction.com/var/git/project
   a3a085e..8ec5b07  styleguide -> styleguide

…but the push apparently completes without error, and everything works fine. There are no local changes to config/development.php, nor have their been for some time. I don't get any errors or warnings on commit, only on push, and not on pull.

What causes the error? (It behaves like a warning, but says it's an error, so I'm going with that term.)


The "error" is happening in a post(-receive) hook ( as evidenced by the remote: prefix) where the hook is pulling the code you pushed into some other repo and that repo has some local modifications that is causing the error.

Since post-receive hooks do no affect the outcome of the push ( since they happen after the push ), the push itself has gone fine, but the pull that the hook attempted as part of the post-receive has failed due to the local changes.

Find where the pull is happening ( in /var/git/project/hooks/ find a post-receive or some other hook that is active and see what it is doing ) and remove the local modifications there.

Judging from your output - you're pushing to a non-bare repo, and someone edited config/development.php on the remote. This is what generates the exchange you're seeing.

Need Your Help

Best practices for imports for installed package

python import distutils

Imagine I have a package "foolibrary" that is installed via setup.py, and I'm the primary developer. Which is the preferred means of calling imports inside the package? Imagine foolibrary has two

When does a delegate setter get called in iOS?

objective-c ios xcode

My code works, but I don't understand who or where is calling the setter for my view's datasource delegate. I understand why calling that code makes everything work, I'd just like to know who makes...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.