Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
how can I solve this git conflict "local changes of the following file would be overwritten by merge"?
I have installed odoo locally using git
I have added addtional addons-folders (one of them is being used to clone community Modules [git or bzr] from elsewhere), so I have added these folder in the .gitignore.
Apparently that was not the best idea because I get a conflict when I want to pull the newest commits (git pull origin 8.0 [ 76c31de51bf9610fc9f3e383ec1b32981eae7078].
Your local changes of the following file would be overwritten by merge:
Please, commit your changes or stash them before you can merge
actually as I do not want to add anything in this case so I would be just fine with my local changes of .gitignore being overwritten.
I found out that the better way to exclude these addon folders is to add them in ./git/indo/exclude (because this is not tracked and therefore can be modified without creating a conflict) and that is what I would do now and keep .gitignore in sync with the remote
so I gues I need either to force the merge of .gitignore or commit my local change, so it can be merged. Any suggestions what would be best here? and if it was forcing to overwrite my local changes in .gitignore ... how do you do that?
git checkout -- .gitignore will reset the content of .gitignore. If you need the changes to be applied later, you can do a git stash save first. Then pull, then do a git stash pop.
A note on adding your own module. You can just leave your own module without adding the folder it to .gitignore. It will just marked as untracked. As long as you don't add those folder into git, it would be fine.
It would be best if you put all of your custom module into a separate folder outside Odoo. You can then set Odoo to search addons from multiple folders (https://www.odoo.com/forum/help-1/question/custom-modules-folder-path-29358).
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 12/4/14, 7:19 PM|
|Seen: 17103 times|
|Last updated: 3/16/15, 8:10 AM|