1. error:failed to push some refs to ' [email protected]:xxxx/xxxx '
hint: updates were rejected because the remote contains work That you dohint: not have locally. this is usually caused by another repository pushinghint: to the same ref. You may want to first integrate the remote changeshint: (e.g., ' Git pull , ... ') before pushing again.hint: See the ' note about Fast-forwards ' in ' git push --help ' for details.
#解决方法: Git pull--rebase origin mastergit push Origin master
2. Your local changes to the following files would is overwritten by merge
error: your local changes to the following files would be Overwritten by merge: protected/config/main.phpplease , commit your changes or stash them before you can merge.
#解决方法: If you want to keep the changes made on the production server, just incorporate the new configuration items, as follows: Git stashgit pullgit stash pops can then use git diff-w + filenames to confirm the automatic merging of the code. In turn, If you want to completely overwrite the local working version with the files in the code base. Here's how: Git reset--hardgit pull where git reset is for the version and if you want to modify the file fallback locally, use git checkout HEAD file/to/restore
3. Possible because you have unmerged files
pull is not possible because you have unmerged files. please, fix them up in the work tree, and then use ' git add/rm <file> ' as appropriate to mark resolution, or use ' Git commit -a '.
#解决方法: View conflicting files 1, git status can also tell us the conflicting files; unmerged paths: (use "git add <file> ..." to mark resolution) both Modi Fied:file2, manually resolve the conflict, and then commit the change: VI filegit Add filegit commit-m ' resolve conflict '
4. CONFLICT (content): Merge CONFLICT in Readme.txt
$ git merge feature1auto-merging readme.txtconflict (content): Merge conflict in readme.txtautomatic merge failed; fix conflicts andthen commit the result.
#解决方法: 1, git status can also tell us about conflicting files; # both Modified:readme.txt #冲突文件为readme. Txt2, view readme.txt content: <<<<& Lt;<
5, the branch ' Feature-vulcan ' is not fully merged.Error:the branch ' Feature-vulcan ' is not fully merged. If you're sure want to delete it, run ' git branch-d feature-vulcan '.
#解决方法: Forcibly delete, need to use command: Git branch-d feature-vulcan.
6. Please move or remove them before you can merge. Aborting#解决方法: Git clean-d-fx "" where x-----Delete files that have not been recognized by git file d-----Delete files that have not been added to the GIT path f-----forced to run
This article is from "Yun Vil Szeng" blog, please be sure to keep this source http://qiangsh.blog.51cto.com/3510397/1769956
Git Error Summary