Cannot add folders (with files) to the .gitignore file in VS Team Explorer
-
(Not sure if this is the correct forum. I'll give it a try.) In my Visual Studio solution I have several projects. (ProjectA, ProjectB and so on...) My solution also contains a .gitignore-file. I would like to add all projects´ /bin and /obj folders to the .gitignore file. These folders, and files in them, always updates when I even the smallest changes. So when I want commit something in Team Explorer, I always see this folders and the files. I don't care about them. In other solutions, I have been able to add folders and files to the .gitignore file in the Team Explorer of my choosing. In those cases I have added the /bin and /obj folders. For this particular solution, this is not possible. I wonder what I'm doing wrong. Any suggestions?
-
(Not sure if this is the correct forum. I'll give it a try.) In my Visual Studio solution I have several projects. (ProjectA, ProjectB and so on...) My solution also contains a .gitignore-file. I would like to add all projects´ /bin and /obj folders to the .gitignore file. These folders, and files in them, always updates when I even the smallest changes. So when I want commit something in Team Explorer, I always see this folders and the files. I don't care about them. In other solutions, I have been able to add folders and files to the .gitignore file in the Team Explorer of my choosing. In those cases I have added the /bin and /obj folders. For this particular solution, this is not possible. I wonder what I'm doing wrong. Any suggestions?
Are they not excluded by default?
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
Are they not excluded by default?
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
I can find the same list of items in my .gitignore. But still the /bin and /obj folders and files are shown in the changes dialog. Here are the items I don't want. Solution folder /.vs folder, sub folders and files. Project A /bin/Debug folder and files. /obj folder, sub folders and files. Project B /bin/Debug folder and files. /obj folder and files. Project C /bin/Debug folder and files.
-
I can find the same list of items in my .gitignore. But still the /bin and /obj folders and files are shown in the changes dialog. Here are the items I don't want. Solution folder /.vs folder, sub folders and files. Project A /bin/Debug folder and files. /obj folder, sub folders and files. Project B /bin/Debug folder and files. /obj folder and files. Project C /bin/Debug folder and files.
Did you add or update the
.gitignore
file after checking your project in for the first time?
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
Did you add or update the
.gitignore
file after checking your project in for the first time?
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
Unfortunately I did not. Several commits after the first commit I added the .gitgnore-file. :(( I'm looking for the "Ignore this local item" selection. Please see the answer in this link from StackOverFlow. This option only seem to be available before doing the first commit. I don't understand why. Is there a solution for me?
-
Unfortunately I did not. Several commits after the first commit I added the .gitgnore-file. :(( I'm looking for the "Ignore this local item" selection. Please see the answer in this link from StackOverFlow. This option only seem to be available before doing the first commit. I don't understand why. Is there a solution for me?
Once you've committed a file to Git, it will be tracked even if you update the
.gitignore
file to exclude it. You'll need to delete your local copy of the file, commit your changes, and then restore your local copy. In this case, try cleaning the solution, committing the changes, and then rebuilding.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
Once you've committed a file to Git, it will be tracked even if you update the
.gitignore
file to exclude it. You'll need to delete your local copy of the file, commit your changes, and then restore your local copy. In this case, try cleaning the solution, committing the changes, and then rebuilding.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
Thanks for the information. It was very useful.[
solar inverter price list
-
Once you've committed a file to Git, it will be tracked even if you update the
.gitignore
file to exclude it. You'll need to delete your local copy of the file, commit your changes, and then restore your local copy. In this case, try cleaning the solution, committing the changes, and then rebuilding.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
Are they not excluded by default?
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
I think this is right. But I am not sure. Let me try once. debt advice