Solutions to some problems of beginner git

Note: This blog only records the learning process and is for reference only.


If there are some configuration files in the system that have been configured and modified on the server, and then some new configuration items are added in subsequent development, when

this configuration file is published, it will happen. Code conflicts:

error: Your local changes to the following files would be overwritten by merge:
        protected/config/main.php
Please, commit your changes or stash them before you can merge.

If you want to keep the changes made on the production server, just Incorporate new configuration items, the processing method is as follows:

git stash

git pull

git stash pop


Pull is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm <file>'

report If this error occurs, you 

can use

git reset to reset the local code


Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326862627&siteId=291194637