使用 Git 和 Intellij 提交更改时出错

发布于 2024-12-09 15:21:31 字数 274 浏览 1 评论 0原文

我使用 Intellij 和 Git 作为版本控制系统。我从事一个特定的项目,并且创建了一个分支,并在其中多次提交了更改。现在,我再次尝试提交更改,但由于发生了我无法识别的错误,因此变得不可能。我最初收到一条消息:“提交因错误而失败”,然后收到一条消息:您的分支领先于 master 3 个提交。 #Untracked files# 使用 git add 包含要提交的内容。

造成这种情况的原因是什么?我实际上应该做什么?

我还收到一条提示,将无法提交的文件移动到另一个更改列表。但这将如何影响该项目?

I use Intellij and Git as Version Control System. I work on a specific project andI have created a branch on which I have committed changes several times. Now I try once again to commit changes but it becomes impossible because of an occurring error which I cannot identify. I receive initially a message: “commit failed with errors” and following a message : Your branch is ahead of master by 3 commits. #Untracked files# Use git add to include in what will be committed.

What can be the cause of that? What should I actually do?

I receive a prompt as well to move the files failed to be committed to another changelist. But how will this affect the project?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

躲猫猫 2024-12-16 15:21:31

它只是说您尚未添加或暂存任何文件/修改以供提交。我不知道 Intellij 的 git 集成,但执行相当于 git add 的操作(可能是 add、stage 等),然后尝试提交。或者从命令行,转到存储库并对要提交的文件/修改执行 git add

It just says that you haven't added or staged any files / modifications for commit. I don't know about Intellij's git integration, but do the equivalent of git add ( might be worded add, stage, etc.) and then try the commit. Or from command line, go to the repo and do a git add on the files / modifications you want to commit.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文