Tag Archives: Pull

Pull is not possible because you have unmerged files

Question reappearance:
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’.
Reasons:
In the process of [Git pull], if there are conflicting files, all other files except the conflicting files are saved as antinuclear zone files.
Local push and merge form references such as merge-head and pushhead.
– HEAD represents a local reference formed after a recent successful push;
The -merge-head represents the reference formed after a successful pull.
Solutions:
You can MERGE-HEAD or HEAD to achieve the effect of type and SVN Revet.
1. Open Git console:
Right click on the project –& GT; 【Open in Terminal】 –& GT; Use the Git command console.
2. Input: Git reset –hard FETCH_HEAD
– To reset conflicting local files, not only to merge-head or HEAD, but also -hard;
– No later hard, no local workspace will be flushed. It just overwhelms the stage.
3. Input: Git pull
Resubmission will succeed.
 
For more highlights, please follow my “toutiao” : Java cloud notes
, anytime, anywhere, to give you the latest, most convenient handheld cloud services

Git did not exit cleanly (exit code 128)

Problem description:

After creating an empty local Git repository, it is intended to Pull the code in the remote repository to the local exception. The specific exception contents are as follows:
git.exe pull –progress -v –no-rebase “origin” master

POST git-upload-pack (275 bytes)
remote: Counting objects: 7, done.
remote: Compressing objects: 100% (6/6), done.
warning: No common commits
remote: Total 7 (0) delta, reused 3 (delta 0), pack – reused 0

* From https://github.com/Jackson-AndyLau/CMSManager branch master – & gt; FETCH_HEAD
* [new branch] master -> origin/master
fatal: refusing to merge unrelated histories

git did not exit cleanly (exit code 128) (4469 ms @ 2018-07-01 11:13:35)

As shown in the figure below:

Solutions:

About this problem, the general solution and the core solution of the content encountered in the previous problem are the consistent “Git did not exit Cleanly (Exit Code 1) solution”.

1. According to the error prompt, we need to delete the git configuration file of the local repository to form an empty folder. Nothing in git folder should appear, and then “Git Clone” project from the remote repository directly, as shown in the figure below:
Empty folder:

2. Directly from the remote GitHub Clone project, it was found that the Clone succeeded, as shown in the figure below:

3. After remote Clone, the following figure appears:

Ok, this is the solution for Git did not exit Cleanly (Exit Code 1). If you have any questions or encounter any questions, please feel free to leave a message to me. I will answer them in detail.
xiehouyu: “learn together, progress together”, also hope that we pay more attention to the CSND IT community.