Git没有';t跟踪现有文件中的更改
我必须承认我对git还是个初学者 我这里有一个cucumber的.feature文件,我在代码中做了很多修改 我已准备好提交,以下是我的工作流程、按顺序执行的命令和结果: git状态Git没有';t跟踪现有文件中的更改,git,Git,我必须承认我对git还是个初学者 我这里有一个cucumber的.feature文件,我在代码中做了很多修改 我已准备好提交,以下是我的工作流程、按顺序执行的命令和结果: git状态 On branch master Your branch is up-to-date with 'origin/master'. Changes to be committed: (use "git reset HEAD <file>..." to unstage) modifie
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: ../package.json
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: ../gulpfile.js
modified: ../package.json
modified: features/some.feature
modified: features/step_definitions/some.js
未为提交而暂存的更改:
(使用“git add…”更新将提交的内容)
(使用“git签出--…”放弃工作目录中的更改)
- git commit-m“我的消息”
- git状态
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: ../package.json
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: ../gulpfile.js
modified: ../package.json
modified: features/some.feature
modified: features/step_definitions/some.js
您的分支机构是最新的“原始/主”分支机构。
要提交的更改:
(使用“git重置磁头…”取消分级)
未为提交而暂存的更改:
(使用“git add…”更新将提交的内容)
(使用“git签出--…”放弃工作目录中的更改)
我做了一个git添加,为什么它不进行gulpfile.js和package.json更改?package.json不是一个新文件,我在过去就已经提交了,但是gulpfile.js是我在工作目录中引入的新文件。它没有转移gulpfile.js和package.json的原因是,当您添加
git add时,它们不在目录中(或目录下)。
,它只添加当前目录及以下目录中的文件。如果您cd..
并执行git add.
,它们将被添加
modified: ../gulpfile.js
modified: ../package.json
modified: ../package.json
modified: features/some.feature
modified: features/step_definitions/some.js
modified: ../gulpfile.js
modified: ../package.json