-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gitignore: ignore .DS_Store for macOS #14721
Conversation
@tommyZZM Please add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why it didn't ignore properly, but we already ignore all dotfiles and whitelist the ones we need. Check the top of the file.
(This change in and of itself should not land.)
(Aside: duplicate of various past issues pre-whitelist: https://github.com/nodejs/node/pulls?q=is%3Apr+ds_store+is%3Aclosed) |
Also, summoning @claudiorodriguez who wrote that patch: 15cc7c0 |
@tommyZZM did you by any chance run |
Thanks @Fishrock123, it does seem like that should cover it, I'll ping @tommyZZM and try to get more information. |
I see the issue now, the node-chakracore$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
(use "git add <file>..." to include in what will be committed
.DS_Store
chakrashim/.DS_Store
npm/.DS_Store
openssl/.DS_Store
openssl/openssl/.DS_Store
v8/.DS_Store
v8/test/.DS_Store
v8/test/mjsunit/.DS_Store
../tools/eslint/.DS_Store
../tools/eslint/node_modules/.DS_Store Which makes sense given the commit that @Fishrock123 referenced, it explicitly allows all dotfiles in the deps directories:
I'm personally not opposed to this change if it simplifies life for potential contributors, but as it stands this appears to be the intended behavior. |
Looks like GitHub has a repo for that: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore |
Ah, right. Ordinarily those folders do not need to be touched, so this isn't usually an issue. I suggest making a refined whitelist for the chakrashim parts specifically and ignoring everything else. The other folders I think it is best to leave up to the end user, lest we repeat the never-ending-meta-file-ignoring again. |
I'm starting to think that having a global .gitignore is the correct solution. Even refining using |
IMO, if you edit the deps directly this is kinda on you. |
I think the consensus was not to land this change, so let's just close the PR. |
i have added .gitignore_global
it works fine in other remotes , but not working in my i found these rules may be the reason cause some .gitignore
i commented these lines and then i tired may the most simplest modification is just add .gitignore
and it works JUST UPDATED i found a solution without remove or add anything the sequence of rules in .gitignore
move the |
But modify sequence of rules will causes more problem
add
my current macOS(10.12.6) will auto generate .DS_Store without actually opening the folder. so this problem nervers me ... i do not thing besides |
Yeah okay, this happens for me as well if I open up
I think @Fishrock123 's suggestion makes most sense. Ignore all dotfiles in @tommyZZM interesting that |
@gibfahn maybe some solfware ( |
Y'all know about |
Doesn't local |
Boop, read it upside down |
.gitignore & .DS_Storehttps://stackoverflow.com/questions/107701/how-can-i-remove-ds-store-files-from-a-git-repository $ vi ~/.gitignore_global
# modify configs with below `ignore_macos.js` file
$ git config --global core.excludesfile ~/.gitignore_global
# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db $ find . -name .DS_Store -print0 | xargs -0 git rm --ignore-unmatch
echo ".DS_Store" >> ~/.gitignore_global
echo "._.DS_Store" >> ~/.gitignore_global
echo "**/.DS_Store" >> ~/.gitignore_global
echo "**/._.DS_Store" >> ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
#Ignore folder mac
.DS_Store
# OR
.DS_Store
._.DS_Store
**/.DS_Store
**/._.DS_Store |
Porting upstream from nodejs/node-chakracore#363 on behalf of @tommyZZM.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
gitignore