Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Very good day to you! I have some problem with making gitignore rule for umbraco project, I want to ignore content of the TEMP folder and Logs folder, I checked different versions, include: /AppData/TEMP/, /AppData/TEMP/*, /AppData/TEMP// but none of them worked for me, I have still the same files for commit in changes section, however, when I write Bin/ then all subfolders in the folder bin exluded from changes section, also I tried to exclude whole folder appdata, by writting following rule: App_Data/, but again this doesn't work and I don't understand why, the same folder Bin is perfectly react on the similar rule.
I mostly use the VisualStudio gitignore from github in addition with this one: https://github.com/github/gitignore/blob/master/Umbraco.gitignore
Like David I use a combination VisualStudio gitignore from github and Gitignore IO
Here is a snippet from my gitignore file that might help.
# Files in bin folders
# Value Converters
# ImageProcessor DiskCache
#Grunt, Sass & Bower
# Ignore Umbraco content cache file
# Don't ignore Umbraco packages (VisualStudio.gitignore mistakes this for a NuGet packages folder)
# Make sure to include details from VisualStudio.gitignore BEFORE this
Thank you for answering, I put those rules in my .gitignore file but again when i do something in umbraco, i see that Visual Studio wants to commit changes from TEMP folder, though the rule is clear about that path
You might have another rule that is overwriting the exclusion behaviour later on in the file.
Also I don't think you need the trailing asterisk on the end. I have recreated the folder structure locally and it works for me.
One thing to check, the .gitignore file works on relative paths from where the .gitignore file is placed. Check its in the right location.
Last resort you could exclude the file extension type e,g. *.hash *.list
Are the files already in Git? If so, you'll have to delete them (and commit that deletion). Git ignore rules don't seem to work for file modifications (only new files will be ignored).
Ok, thanks a lot, just deleted local git repository and created a new one by using provided set of gitignor rules, thank you very much!
If you do update your gitignore file, you can run the following commands in your git bash (or whatever you're using) to "reset" your commits instead of recreating the whole repo:
git rm -r --cached . <- note the full stop
git rm -r --cached .
This removes all the currently cached files in your repo
git add . <- again note the full stop
git add .
This adds everything back to the repo according to the "new" gitignore rules you've just added or updated
git commit -m "gitignore updated" <- or something along these lines!
git commit -m "gitignore updated"
This commits all changes to the head so everything is ready for the next push!
Hope this helps!
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted