当前位置:   article > 正文

git add .失败解决办法_you ran 'git add' with neither '-a (--all)' or '--

you ran 'git add' with neither '-a (--all)' or '--ignore-removal', whose beh

“git add”出错

git-add-error

近日使用“git add”出现如下错误:

 

$ git add ./
warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal',
whose behaviour will change in Git 2.0 with respect to paths you removed.
Paths like 'inc/jquery2.1.1/jquery.min.js' that are
removed from your working tree are ignored with this version of Git.

* 'git add --ignore-removal <pathspec>', which is the current default,
  ignores paths you removed from your working tree.

* 'git add --all <pathspec>' will let you also record the removals.

Run 'git status' to check the paths you removed from your working tree.

使用“git status”查看状态:

 

 

$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        modified:   app/js/app.js
        new file:   app/tpl/admin.html
        new file:   app/tpl/home.html
        new file:   inc/jquery.2.1.1/jquery.min.js
        modified:   index.html

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

        deleted:    inc/jquery2.1.1/jquery.min.js

解决方法很简单:

 

 

$ git add -A  #或 git add -all
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/article/detail/54207
推荐阅读
相关标签
  

闽ICP备14008679号