GitHub for Mac - 暂存工作不正常(未提交更改)

时间:2013-07-23 01:26:19

标签: git github commit

我正在使用 GitHub for Mac 应用程序,截至最近,它一直在向我抛出此错误:


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

  modified:   bin/plugin.yml
  modified:   src/plugin.yml

Untracked files:
(use "git add <file>..." to include in what will be committed)

  .gitignore

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

我不知道这是做什么的,因为以前程序正在提交和同步很好,但现在我必须转到命令行并输入“git add .”和“git push”为了使它工作,所以GitHub应用程序对我来说已经变得毫无用处 我想保留应用程序以方便使用,但此刻,它看起来不太好。

1 个答案:

答案 0 :(得分:2)

正确的顺序是:

git add .
git commit -m "commit .gitignore"
git push

commit步骤非常重要,如果你想推送任何东西)

然后尝试一个新的克隆,看看Mac的GitHub是否仍然抱怨新的本地回购。

OP jflory7提及in the comments

  

似乎清除缓存是解决问题的最佳方法。