Xia,
the .gitignore is like a teenager. It has grown up and has angry edges.
If you describe what you want to ignore, then we can offer an example, and
explain it.
Most of the time the special rules are not needed.
You can have .gitignore files in many levels of repository worktree, but most
people never use that.
--
Philip
----- Original Message -----
From: Xia Hong
To: Git for human beings
Sent: Wednesday, December 14, 2016 6:23 PM
Subject: [git-users] some questions about gitignore
Hi , ALL
I don't understand .gitignore well, how should i make it?
my git version is 1.8.3.1
1. "Trailing spaces are ignored unless they are quoted with backslash ("\")."
seem not always work. end '/' with or without trailing spaces will be
differnet, in my test.
2. in my opinion, why logic of gitignore is so strange? Office Documentation
is not clear:
1) i guess rules of format pattern is take one by one like if ...:then ...
[elif ... : ...]+ else:... so the last leading slash "/pattern" how to work?
logically , before has some Otherwise, is it strange that some if after final
else? and how pattern to be solved ?my understanding is fnmatch?
2) "Git treats it as a shell glob pattern and checks for a match against the
pathname relative to the location of the .gitignore file (relative to the
toplevel of the work tree if not from a .gitignore file)." i don't understand
it personally, how shell glob pattern work , and how function parametrs set ?
and then stackoverflow some results , i retest it and find this rule will try
recursive the directory tree to find possible pattern matchs. Is the above
url's understanding correct?
3) the overall logic seem strange and unclear for me personally, it seems i
have to read source code to get all logic.
I don't feel clear enough neither the big picture nor the details to design
.gitignore. for example, why we can reinclude subdirectory but not files...
Sorry for my stupid questions, thanks very much for listening my complains....
--
You received this message because you are subscribed to the Google Groups
"Git for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.