* git-mv ignores gitignore file
@ 2016-02-16 8:35 Zheng Lv
0 siblings, 0 replies; only message in thread
From: Zheng Lv @ 2016-02-16 8:35 UTC (permalink / raw)
To: git
gitignore(5) manual says that
> A gitignore file specifies intentionally untracked files that Git
> should ignore. Files already tracked by Git are not affected ...
> The purpose of gitignore files is to ensure that certain files not
> tracked by Git remain untracked.
which means that the following operations are totally correct.
$ echo "b" >> .gitignore
$ echo "Something" > a
$ git add a
$ git mv a b
Equivalantly,
$ echo "b" >> .gitignore
$ echo "Something" > b
$ git add --force b
That is, doing something --force when --force it is not specified.
However, this may not be the intented behavior. The user might not want
to equivalantly add a `new' file b to the index when b should be
gitignored. Such operations are possibly oversight of users.
The ideal behavior, issue a warning when git-mv target collides with
gitignore.
Thanks.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-02-16 8:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-16 8:35 git-mv ignores gitignore file Zheng Lv
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).