bin/AndroidManifest. XML
Please move or remove them before you can merge.
Aborting
scheme 1:
git clean-d-fx “”
one of them
x — deleting ignored files is no longer recognized by git
d — deletes files not added to git’s path
F — Forced operation
Scheme 2:
The following error occurred in git pull on the server today:
error: Your local changes to the following files would be overwritten by merge:
Please, commit your changes or stash them before you can merge.
Aborting
I do not know what causes the code conflict, the solution is as follows:
If you want to keep the changes made on the production server, simply incorporate the new configuration item:
git stash
git pull
git stash pop
You can then use Git diff-w + file names to verify that the code is automatically merged.
If you want to completely overwrite the local working version with files from the code base, do so as follows:
git reset –hard
git pull
Solution 3:
Problem 1: Fix GIT repositories that are out of sync
Appear today when performing git pull:
[root@gitserver /data/work/www/rest/lib/Business/Inventory]# git pull Enter passphrase for key '/root/.ssh/id_rsa': Updating 70e8b93..a0f1a6c error: Your local changes to the following files would be overwritten by merge: rest/lib/Business/Inventory/ProductStatus.php Please, commit your changes or stash them before you can merge. Aborting
The solution :
executes git checkout-f, and then pulls git checkout again
[root@gitserver /data/work/www/rest/lib/Business/Inventory]# git checkout -f Your branch is behind 'origin/master' by 2 commits, and can be fast-forwarded.
When git pull is performed, it is ready:
[root@gitserver /data/work/www/rest/lib/Business/Inventory]# git pull Enter passphrase for key '/root/.ssh/id_rsa': Updating 70e8b93..a0f1a6c Fast-forward rest/lib/Business/Inventory/ProductStatus.php | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) mode change 100644 => 100755 rest/lib/Business/Inventory/ProductStatus.php
Second problem: the default location of Git Pull.
1. When Git is under the branch of master, the default remote is origin;
2. When using git pull under the master brach, specify remote and merge, use the default remote and merge.
but for your own project, and push to the remote server, there is no such thing, you need to configure yourself.
if you directly run git pull, you will get the following results:
Tips after executing Git Pull:
$ git pull Password: You asked me to pull without telling me which branch you want to merge with, and 'branch.master.merge' in your configuration file does not tell me, either. Please specify which branch you want to use on the command line and try again (e.g. 'git pull <repository> <refspec>'). See git-pull(1) for details. If you often merge with the same branch, you may want to use something like the following in your configuration file: [branch "master"] remote = <nickname> merge = <remote-ref> [remote "<nickname>"] url = <url> fetch = <refspec> See git-config(1) for details.
The solution is to configure git Config as follows.
git remote add -f origin [email protected]:rest.git git config branch.master.remote origin git config branch.master.merge refs/heads/master
Plan 3 from “ritto ‘s blog” blog, please be sure to keep this from http://ritto.blog.51cto.com/427838/741342
Read More:
- error: The following untracked working tree files would be overwritten by merge
- Error: your local changes to the following files would be rewritten by merge solution
- Pull is not possible because you have unmerged files. Please, fix them up in the work tree, and then
- Git pull error: pull is not possible because you have unmerged files
- [Git] git pull pull remote git push to remote git commit submit reject
- error: Your local changes to the following files would be overwritten by merge
- Error: You have not concluded your merge (MERGE_HEAD exists)
- CentOS solves the problem of modulenotfounderror when salt calls python3 script remotely, and solves the problem that PIP3 module cannot be shared by different users
- Git Pull Failed solution
- How to solve error: failed to push some refs to ‘[email protected]:……git pull conflict
- Git pull undo misoperation
- Resolving fatal: reusing to merge unrelated histories in Git
- Pull is not possible because you have unmerged files
- Solve the error error fetching remote repo origin problem in Git on Jenkins
- Error report after solving git push origin master
- Error: pathspec ‘origin / xxx’ did not match any file (s) known to GIT
- You have not concluded your merge (MERGE_HEAD exists)
- [FAQ] after git merge, the push to Gerrit fails, indicating no new changes?
- Please specify which branch you want to merge with
- pathspec ‘master’ did not match any files known to git