Back to Top

Solution: Git Pull is not possible because you have unmerged files

Solution: Git Pull is not possible because you have unmerged files

Git is a distributed version control system with C language development. Version control system can keep a history of files, and can roll back files to another state using history.

Git and Github include some very cool features. Here I am going to share solution of one of the issues you ever get if you have used GitHub.

It is very common issue you might get while using Github and issue is listed below:

This issue might occur if you have changes in same files or same line of the file.So GitHub is not allowing to pull changed before you merge its index.

Firstly, I don’t understand what is this issue so I searched this issue in google and every site where I get solution and everyone is saying to commit files or remove uncommitted files to pull files from server.
But it is not possible because I want to keep changes and also want to get changes from the server.

Git has three working areas, namely: the working directory (Working Directory), the staging area (Stage or Index) and repository (Repository or Git Directory).

So as the solution of the above issue what I did is, Add the file to Github using git add command because I don’t want to commit local changes to pull changes from server and technically it is not necessary too.
Let’s check the command:

The git adds command adds a change in the working directory to the staging area, then, change the status Staged state.it was placed Git staging area.Git adds command will inform Git that you have changes in the same file and will include updates to a particular file in the next commit.

Git add command not affect the repository in any way,It just add file contents to the index so changes in the files are not recorded until you run git commit command so it is the safest way or solution you can do when you get above error.

Here, I am done with my article and hope this solution is useful to you and clear your mind, let me know if you have any suggestion/comments/questions on this trick/article.

Share:
Share on Facebook1

Share on LinkedIn0Tweet about this on TwitterShare on Google+0Buffer this pageDigg thisShare on Reddit0

Leave a Reply

Your email address will not be published. Required fields are marked *

Most Popular Posts

Table layout using DIV tags

Posted on 4 years ago

Bhumi

GoTo statement in PHP

Posted on 5 years ago

Bhumi

Mysql String Function FIND_IN_SET( )

Posted on 5 years ago

Bhumi

Post via e-mail in WordPress

Posted on 4 years ago

Bhumi