git - Relative parent directory path for .gitignore -
in sbt-project have files not want share colleagues personal notes , stuff that. want have them .gitignore
d. 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
personal
directory , files inside it. - ignoring files or directories outside of
personal
directory 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
personal
directory , files inside it. - it ignore files
.dictionary
suffix no matter if inside or outsidepersonal
directory.
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