Reputation: 1069
I have a project named "shortcut", here is my issue & steps
cd shortcut
vim .gitignore
git init
git add *
git status
I could still see all the .exe files and .pdb files are in the staging. what's wrong with my git operation steps ???
here is my .gitignore file
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
*.exe
*.pdb
*.dll
Upvotes: 0
Views: 91
Reputation:
I think you're confused, although it's hard to tell exactly where. Consider the following:
$ mkdir shortcut
$ cd shortcut
$ touch foo
$ echo foo > .gitignore
$ git init
Initialized empty Git repository in ~/shortcut/.git/
$ git add *
The following paths are ignored by one of your .gitignore files:
foo
Use -f if you really want to add them.
fatal: no files added
Upvotes: 1