1

Need to setup gitignore for upcoming project, current testing however shows it doesn't actually ignore the untracked file.

eBGTest being my git repo, the file I'm trying to ignore is eBGTest/test

eBGTest/.gitignore

/test/
.test
test
test
test
test
/test
./test
eBGTest/test
test.test

Edit (git status output): Untracked files: (use "git add ..." to include in what will be committed)

    .gitignore
    test

no changes added to commit (use "git add" and/or "git commit -a")

It's not being tracked by git as you can see above

Peter Lang
  • 65
  • 5

2 Answers2

1

try to add like this

  .test #or /test/

OR see this sites Github

OR gitignore

OR tutorials

Khaled Sameer
  • 296
  • 2
  • 10
-4

Make git add .gitignore; git commit -m 'First commit - gitignore'

For the .gitignore to ignore the files, you must first commit, and then the changes will be applied.

After this, the test file will be ignored.

otharwa
  • 33
  • 4
  • Committed .gitignore, results are the same, test is not ignored. Untracked files: (use "git add ..." to include in what will be committed) test – Peter Lang Apr 03 '19 at 19:52
  • 1
    This is incorrect. `.gitignore` does not need to be committed to work (though it _should_ be; local-only ignores should go into `.git/info/exclude` instead). – ChrisGPT was on strike Apr 03 '19 at 20:26