GitHub for Mac:无法提交和同步或只是提交,因为我必须先添加文件 [英] GitHub for Mac: Can't commit and sync or just commit because I have to add files before

查看:163
本文介绍了GitHub for Mac:无法提交和同步或只是提交,因为我必须先添加文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法提交和同步Mac应用程序GitHub中的文件,因为该应用程序说我必须先添加这些文件,但我希望应用程序能够为我执行此操作。我不想每次都去终端 git add -A 。我的合作伙伴可以提交并同步,GitHub for Mac应用程序会为他添加文件。

I can't commit and sync files from the GitHub for Mac App because the app says that I have to add the files previously, but I want to the app do that for me. I don't want to go to the terminal to git add -A every time. My partner can commit and sync and the GitHub for Mac app adds the files for him.

这是应用程序返回的错误:

This is the error that the app returns:

Git Error:

On branch master Changes not staged for commit: (use "git add ..." to
update what will be committed) (use "git checkout -- ..." to discard
changes in working directory)

modified: .gitignore

... more files here :)

no changes added to commit (use "git add" and/or "git commit -a")
(256)

我该如何解决这个问题?

How do I fix this?

推荐答案

<所以,如果我正确地理解你的问题......你不想有额外的步骤使用 git add 正确吗?如果是这样,那么这对于Git来说是不可避免的。这是一个非常重要的步骤,完全避免它是相对不可能的。

So if I understood your problem correctly... You don't want to have the extra step of using git add correct? If so, then this is unavoidable with Git. This is a step that's very important, and so completely avoiding it is relatively impossible.

您可能需要设置一个别名 git commit -a 会自动生成,但实际上,这一步骤是不可避免的,无需输入或使用别名。

You might want to setup up an alias that does git commit -a for you automatically, but really, this step is unavoidable, without either typing it or using an alias.

另外,如果这属于评论(由于某些原因,不能对主要问题进行评论)。

Also, sorry if this belongs in a comment (can't do comments on the main question for some reason).

这篇关于GitHub for Mac:无法提交和同步或只是提交,因为我必须先添加文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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