Created
July 8, 2016 15:42
-
-
Save anonymous/10af84f8b9bc07e30b16e4889faa107a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git --version | |
git version 2.8.0.rc3.226.g39d4020 | |
$ ls -a | |
. .. | |
$ mkdir -p foo/bar/; touch {,foo/,foo/bar/}{a,b,c}; echo '/*' > .gitignore; | |
$ find -type f | sort | |
./b | |
./a | |
./c | |
./foo/a | |
./foo/bar/a | |
./foo/bar/b | |
./foo/bar/c | |
./foo/b | |
./foo/c | |
./.gitignore | |
$ cat .gitignore | |
/* | |
$ git init | |
Initialized empty Git repository in /tmp/test/.git/ | |
$ git status --porcelain --ignored --untracked-files=all | |
!! .gitignore | |
!! a | |
!! b | |
!! c | |
!! foo/a | |
!! foo/b | |
!! foo/bar/a | |
!! foo/bar/b | |
!! foo/bar/c | |
!! foo/c | |
$ cat >> .gitignore | |
!/foo/bar/ | |
$ cat .gitignore | |
/* | |
!/foo/bar/ | |
$ git status --porcelain --ignored --untracked-files=all | |
?? .gitignore | |
?? a | |
?? c | |
!! b | |
!! foo/a | |
!! foo/b | |
!! foo/bar/a | |
!! foo/bar/b | |
!! foo/bar/c | |
!! foo/c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment