问题描述
我正在尝试从CLI将更新推送到我的git repo,但是“ git add”。什么也没做当我运行该命令时,我的终端中出现空白行,什么都不做,最终我终止了该进程。我会共享代码,但我不知道问题的根源可能在哪里。我最近确实在我的git repo中添加了一个协作者,所以这可能与它有关吗?我从来没有遇到过这个问题。有谁知道为什么会这样?
编辑:这是git status的输出:
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
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: client/src/components/ExploreDirectory/ExploreDirectory.js
modified: client/src/components/ExploreDirectory/exploredirectory.css
modified: client/src/components/ProposalBox/ProposalBox.js
modified: client/src/components/ProposalBox/proposalbox.css
modified: client/src/pages/explore/all/All.js
modified: client/src/pages/explore/all/all.css
modified: client/src/pages/explore/arts/Arts.js
modified: client/src/pages/explore/arts/arts.css
modified: client/src/pages/explore/directAction/DirectAction.js
modified: client/src/pages/explore/directAction/directaction.css
modified: client/src/pages/explore/explore.css
modified: client/src/pages/explore/sciences/Sciences.js
modified: client/src/pages/explore/sciences/sciences.css
Untracked files:
(use "git add <file>..." to include in what will be committed)
.DS_Store
models/
node_modules/
src/
no changes added to commit (use "git add" and/or "git commit -a")
解决方法
git add在添加过程中会发生这种情况;
- 文件太多
- 和/或太大的文件
这就是git status
可以帮助您查明您要添加的内容的原因。
参见“ Can I make “git status” show the file size of untracked files?”