无法推入/拉入git-使用Visual Studio [英] Cannot do push / pull in git - working with visual studio

查看:59
本文介绍了无法推入/拉入git-使用Visual Studio的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试推送它们时,我做了很多更改-我遇到了下一个错误:

I have made a lot of changes, when I am trying to push them - I am getting the next error:

您不能将分支母版推送到远程源,因为远程存储库的分支中有新的提交.推送此分支将导致在远程存储库中对该分支进行非快速更新.

当我尝试进行更改时,我得到了:

When I am trying to pull the changes I get:

由于未提交的更改而无法拉出.在再次拉动之前,提交或撤消您的更改.有关详细信息,请参见输出"窗口.

我没有任何未提交的更改...

I dont have any uncommitted changes...

我双向都有库存,不知道如何解决这个问题.

I am stock from both ways and dont know how solve this issue.

*不久前,我运行命令:git rm --cached来解决git ignore问题.可能是连接吗?

*not long ago I run the command: git rm --cached in order to solve a git ignore issue. could be it is connected?

推荐答案

尝试以下过程:

存储本地提交尝试获取更改,然后推送:

stash your local commits Try to get the changes and then push:

$ git stash

从主人那里拉拉

$ git pull 

拉出master分支后找回本地更改

get your local changes back after pulling the master branch

$ git stash pop

提交本地更改

$ git commit

推送

$ git push

这篇关于无法推入/拉入git-使用Visual Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆