Write a file with -intent-to-add

I use the --intent-to-addc option git addto easily add files using git commit -a. However, this seems to be confusing git stash. For example:

git init
touch a
git add a
git commit -m 1
touch b
git add --intent-to-add b
git stash --include-untracked

outputs the result from git stash:

error: Entry 'b' not uptodate. Cannot merge.
Cannot save the current worktree state

Why is this happening? Could it be fixed?

+4
source share

Source: https://habr.com/ru/post/1624083/


All Articles