18

私はちょうどこのメッセージに出くわしました:

$ 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 'README.md' 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.

何かが予期せず追加された場合にできるので、設定--allはかなり正気のデフォルトだと思います。resetその動作をデフォルトにするにはどうすればよいですか?

4

2 に答える 2

3

git を使用するとエイリアスを作成できるので、これを試すことができます。

git config --global alias.adall 'add . --all'

ここでは、不要な追加を避けるために「add」ではなく「adall」を使用しますが、必要に応じて追加もOKです。

この構成の後、以下のようなコマンドですべてを追加できます。

git adall
于 2013-10-17T06:12:26.807 に答える