How to recursively clean only those untracked files that are not ignored?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



According to the help, without -x option git clean should let alone the ignored files, but it doesn't.

    [il@reallin test]$ cat .gitignore
    *.sar
    [il@reallin test]$ mkdir -p conf/sar && touch conf/sar/aaa.sar
    [il@reallin test]$ git status
    # On branch master
    nothing to commit, working directory clean
    [il@reallin test]$ git clean -df
    Removing conf/

conf/sar/aaa.sar is removed.

I already asked this http://stackoverflow.com/questions/23148736/git-clean-removes-ignored-files-by-default

Someone even replied that "git does exactly what documentation says".
Well, maybe, but I have doubts that the combination '-df' (without
'-x') is useful at all. If someone wanted to delete ignored files, he
would use '-x' or '-X'.


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]