git add -N vs. git stash

From: Uwe Kleine-König <hidden>
Date: 2022-08-08 16:48:51

Hello,

somehow git stash doesn't understand the index after git add -N:

	$ git version
	git version 2.36.1

	$ git init -q

	$ echo foo > foo

	$ git add foo

	$ git commit -a -m .
	[main (root-commit) 0e4b48cb4913] .
	 1 file changed, 1 insertion(+)
	 create mode 100644 foo

	$ echo bar > bar

	$ git add -N bar

	$ git stash push
	error: Entry 'bar' not uptodate. Cannot merge.
	Cannot save the current worktree state

I'd say that's not a feature, is it?

I would have expected the last command to just remove bar from the
index.

Best regards
Uwe

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help