Sync with Team Explorer on VS 2015

Asked

Viewed 305 times

1

When trying to make a sync I get the message:

Cannot pull because there are Uncommitted changes. Commit or undo your changes before Pulling Again. See the Output window for Details.

When trying to push I get the message:

You cannot push branch master to remote origin because there are new commits in the remote Repository’s branch. Pushing this branch would result in a non-fast-forward update on the branch in the remote Repository.

The right thing would be to merge, right? But I get the message:

An error occurred. Detailed message: 1 Uncommitted change would be overwritten by merge

Where I resolve this conflict?

In advance, I thank you

Diogenes

1 answer

1

You may have (new/changed) files that are not in your commit (Untracked files).

It is possible to identify them by Git command prompt. Navigate to the project/repository root directory (example cd c:/Documents/Your repository), typhoon "git status", for example:

inserir a descrição da imagem aqui

Note that the file "octocat.txt" is not being tracked (it is a untracked file).

If you’d like to commit the files, add them to your commit, typhoon "git add ." for Git to re-program all files or "git add filename", example "git add octocat.txt".

Then type git commit -m "Text of your commit here!" to create a commit.

Otherwise, throw them out (see the documentation here for details before executing the commands), you could use git reset --hard or git reset filename. To undo unwanted changes you could use git checkout -- filename.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.