add git 指定类型文件夹_初学git 想add整个文件夹 但出现了问题 想请教各位大手...

你应该是 git add --all 以后 修改了 dapingmu 内的文件了 所以显示和你图内的一样

每次修改文件后都需要 stage 目标文件的 不然是不能commit 的

如下操作 获得返回结果和题主一样:

D:\PHP\Tmp

λ mkdir GitAdd

D:\PHP\Tmp

λ cd GitAdd\

D:\PHP\Tmp\GitAdd

λ ls

D:\PHP\Tmp\GitAdd

λ git init

Initialized empty Git repository in D:/PHP/Tmp/GitAdd/.git/

D:\PHP\Tmp\GitAdd (master)

λ mkdir dapingmu

D:\PHP\Tmp\GitAdd (master)

λ git status

On branch master

Initial commit

nothing to commit (create/copy files and use "git add" to track)

D:\PHP\Tmp\GitAdd (master)

λ ll

total 8

drwxr-xr-x 1 zykj 197121 0 8月 4 17:12 .

drwxr-xr-x 1 zykj 197121 0 8月 4 17:12 ..

drwxr-xr-x 1 zykj 197121 0 8月 4 17:12 .git

drwxr-xr-x 1 zykj 197121 0 8月 4 17:12 dapingmu

D:\PHP\Tmp\GitAdd (master)

λ cd dapingmu\

D:\PHP\Tmp\GitAdd\dapingmu (master)

λ touch test.txt

D:\PHP\Tmp\GitAdd\dapingmu (master)

λ cd ..

D:\PHP\Tmp\GitAdd (master)

λ git status

On branch master

Initial commit

Untracked files:

(use "git add ..." to include in what will be committed)

dapingmu/

nothing added to commit but untracked files present (use "git add" to track)

D:\PHP\Tmp\GitAdd (master)

λ git add --all

D:\PHP\Tmp\GitAdd (master)

λ git status

On branch master

Initial commit

Changes to be committed:

(use "git rm --cached ..." to unstage)

new file: dapingmu/test.txt

D:\PHP\Tmp\GitAdd (master)

λ echo 123 >> dapingmu\test.txt

D:\PHP\Tmp\GitAdd (master)

λ git status

On branch master

Initial commit

Changes to be committed:

(use "git rm --cached ..." to unstage)

new file: dapingmu/test.txt

Changes not staged for commit:

(use "git add ..." to update what will be committed)

(use "git checkout -- ..." to discard changes in working directory)

modified: dapingmu/test.txt

D:\PHP\Tmp\GitAdd (master)

λ git commit -m "not add modified file"

[master (root-commit) d5e1197] not add modified file

1 file changed, 0 insertions(+), 0 deletions(-)

create mode 100644 dapingmu/test.txt

D:\PHP\Tmp\GitAdd (master)

λ git status

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: dapingmu/test.txt

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值