使用 Git 和 Intellij 提交更改时出错
我使用 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技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它只是说您尚未添加或暂存任何文件/修改以供提交。我不知道 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 agit add
on the files / modifications you want to commit.