I've got a local db and install of Craft as well as a remote. I'm pushing to bitbucket from my local Mamp environment then pulling from bitbucket to my server via ssh.

I recently updated Craft by clicking the prompt inside the dashboard. When I did this, it editing nearly every file in /craft/app leaving a ton of modified files registered in git.

I should have had craft/app in my .gitignore file but I didn't. Now when I try to pull I'm getting this error:

error: Your local changes to 'craft/app/Info.php' would be overwritten by merge.  Aborting.
Please, commit your changes or stash them before you can merge.

How can I force my remote build to ignore everything in craft/app so I can get back to pushing/pulling.

  • 1
    While this question is really 80% Git and 20% Craft, I don't believe that it should be closed as "off-topic". After all, the question is related to Craft, specifically handling Craft updates across multiple environments. Jason provides a solid answer which does a good job of explaining (A) how to solve the problem, (B) what exactly is happening here, and (C) some advice in dealing with git workflow "best practices".
    – Lindsey D
    Commented Dec 14, 2014 at 21:53
  • 1
    Jeremy, you may want to check out these related threads, which describe how others are handling their update workflow. To be clear, there is no single "right answer"... You've probably got two or three good ways that you could handle updating Craft across multiple environments. craftcms.stackexchange.com/q/13/45 | craftcms.stackexchange.com/q/4425/45 | craftcms.stackexchange.com/q/55/45 | craftcms.stackexchange.com/q/10/45
    – Lindsey D
    Commented Dec 14, 2014 at 21:58

1 Answer 1


The error that you are seeing is because you have changes in your local repo that need to be saved (committed) first.

I'm also a huge Git user and wanted to touch on a few items in your question.

  1. The craft/app folder should always be in your Git repository as its the foundation of making your site run Craft.

  2. If you want to see an example Craft Git project, you can take a look at this repository: https://github.com/themccallister/craft-foundation

  3. The only directories that should be ignored are storage (make sure you keep the actually directory using this trick: https://stackoverflow.com/questions/115983/add-empty-directory-to-git-repository) and any directories in public that will contain user uploaded files (i.e public/images/uploads). This will ensure that the directory contents are not overwritten during deployment, ensuring that backups, sessions and user content will remain after the deploy.

As far as your remote build... The typical workflow for Git should look something like this:

  1. Download and update Craft locally

  2. Commit your changes to your local environment (should mostly be updates in the craft/app directory)

  3. Push your changes to your remote repository (typically referred to as origin or upstream)

  4. Deploy the update.

Note: If you are building using a tool like (http://dploy.io) you can login and push the changes to your environment. If you are SSHing into the server and running git pull origin that would work as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.