git - Relative parent directory path for .gitignore -
in sbt-project have files not want share colleagues personal notes , stuff that. want have them .gitignored. how can this. placed folder personal project , added .gitignore there line
../personal/ i hoped hide folder personal (including responsible .gitignore) git, seems not valid git. how can achieve this?
also /personal/ not work hoped.
option 1: using .gitgnore file
in personal directory create .gitignore file following content:
* - git ignore
personaldirectory , files inside it. - ignoring files or directories outside of
personaldirectory not possible using approach (at least don't know how achieve using option).
option 2: using .git/info/exclude file
add following lines .git/info/exclude file:
/personal *.dictionary - git ignore
personaldirectory , files inside it. - it ignore files
.dictionarysuffix no matter if inside or outsidepersonaldirectory.
further notes & documentation
files tracked git not affected. purpose of gitignore files ensure files not tracked git remain untracked. stop tracking file tracked, use
git rm --cached.gitignore man page: see section "description" overview different options exist ignore files within git repository , when use option.
Comments
Post a Comment