当我尝试从git更新项目时,我收到此错误:无法保存未提交的更改 [英] When I try to update project from git I get this error: Couldn't save uncommitted changes

查看:3792
本文介绍了当我尝试从git更新项目时,我收到此错误:无法保存未提交的更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新工作。我是一名初级java开发人员。我们使用Intellij IDEA java开发编辑器,git(atlassian)和jira。我有一个git的问题。这个问题是当我尝试收到错误时所说的无法保存未提交的更改。
尝试在更新前保存存储中未提交的更改,但因错误而失败。。

I'm new on the job. I work as a junior java developer. We use Intellij IDEA java development editor, git(atlassian) and jira. I have a problem with git. This problem is when I try I get an error what is say "Couldn't save uncommitted changes. Tried to save uncommitted changes in stash before Update, but failed with an error.".

这是我的git配置和错误的屏幕截图。

Here is the screen shots of my git configuration and errors.

推荐答案

从git bash转到此repo。

Go to this repo from git bash.

然后运行此命令(检查当前的非舞台更改) :

Then run this command (to check your current unstage changes) :

git status

然后在下面的命令中应用以存储它们:

Then apply below command to stash them :

git stash save "give proper comment to identify it later"

现在检查你的非舞台更改是否藏匿或不运行此命令:

Now to check your unstage changes are in stash or not run this command :

git stash list

现在,您可以从远程分支中提取最新更改。 (git pull)

Now, you can pull your latest changes from your remote branch. (git pull)

拉回后重新申请你的藏匿处:

To reapply your stash after pull :

git stash apply stash_id

(这里,stash_id就像stash @ {n})

(here, stash_id is like stash@{n})

这篇关于当我尝试从git更新项目时,我收到此错误:无法保存未提交的更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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