ignore

How to I add something to the .gitignore so that the match is not recursive?

廉价感情. 提交于 2019-12-02 19:55:42
How to I add something to the .gitignore so that the match is not recursive? For example, I wish to ignore the directory foo and the file bar.txt in the current directory, but not any that exist in subdirectories. I have tried this for my .gitignore file: foo/ bar.txt But unfortunately git applies this recursively, so that otherdir/bar.txt and otherdir/foo/ also get ignored, which is not what I want. (Is there a command in git that shows me all ignored files, and reference the .gitignore file that is responsible for the file being ignored? This would be useful for debugging.) The solution is

SVN: Ignore some directories recursively

余生长醉 提交于 2019-12-02 15:41:15
I don't want any directory named build or dist to go into my SVN no matter how deep in the tree it is. Is this possible? In git I just put build dist in my .gitignore at the root and it recursively ignores. How do I do this with svn? Please don't tell me to do a propset on every parent dir... As of subversion 1.8, there is now the svn:global-ignores property which works like svn:ignore but recursively (so set this on your top-level directory) svn propset takes --recursive as an option, so you can do this, with two downsides: you have to check out the entire repository (or at least all

Git ignore locally deleted folder

限于喜欢 提交于 2019-12-02 14:19:09
I have a Ruby on Rails application which crashes when vendor/rails is present but works fine if it is not. I need to keep this folder deleted in my local copy so that I can work, but I don't want this deletion to ever be committed. Someone put it there for a reason. So how do I delete this folder without it coming up in git status as a thousand deleted files? Obviously .gitignore won't work since you can't ignore files which are already tracked. Neither do any of the solutions listed here ( git update-index --assume-unchanged ) work. git ls-files --deleted -z | git update-index --assume

Git - Temporarily ignore trivial changes to files

假装没事ソ 提交于 2019-12-02 14:14:18
I'm looking for a way to 'hide' minor changes made to a few files in Git, such that they will not show up in git status until a different change is made to those files. Example: I have a java file where the only change made is the removal of an unused import (a contributor forgot to run an organize imports before committing). Now I have removed that import and the change (obviously) shows up in git. Since I have no other change to make to that file, I don't really like committing the file as part of another (unrelated) change or committing this change stand-alone. Sure, I could revert the

Git diff -w ignore whitespace only at start & end of lines

放肆的年华 提交于 2019-12-02 13:48:03
I love to use git diff -w to ignore whitespace differences. But, I just noticed that it ignores even whitespace differences in the middle of lines. How could I only ignore whitespace differences that come at the start (^) or end ($) of lines? Fake Code Monkey Rashid For end of line use: git diff --ignore-space-at-eol Instead of what are you using currently: git diff -w (--ignore-all-space) For start of line... you are out of luck if you want a built in solution. However, if you don't mind getting your hands dirty there's a rather old patch floating out there somewhere that adds support for "-

Can I make a code in python that ignores special characters such as commas, spaces, exclamation points, etc?

狂风中的少年 提交于 2019-12-02 05:29:59
I want to create a code that will return "true" (if I type in a palindrome regardless of case or if there are special characters in it), and "false" otherwise. The code I have so far works for phrases with no special characters such as commas, apostrophes, spaces, etc. def is_palindrome(my_str): my_str= my_str.casefold() rev_str= reversed(my_str) if list(my_str) == list(rev_str): print("True") else: print("False") when I do: print (is_palindrome("Rats live on no evil star")) it returns True because it is a palindrome when I do: print (is_palindrome("Hello World!")) it returns False because it

Which file does svn:ignore modify?

拜拜、爱过 提交于 2019-12-02 02:45:48
I would like to know which file svn propset svn:ignore modifies (equivalent to .gitignore ) so that I can actually commit that file to the repo. E.g. I am working with Java and Maven , which creates a directory named "target", which I am ignoring. svn propset svn:ignore target . does work but I don't know which settings file is modifies by that command so that I propagate the change to my team. RELATED: SVN ignore like .gitignore mateuszlo svn:ignore property is stored together with other properties inside the .svn folder. It will be stored in the repository automatically after your next

What grails project files should not be added to version control? (Grails 1.3.x)

夙愿已清 提交于 2019-12-01 19:14:23
(This question has been asked before, but a while back: Suggestions for Grails .gitignore ; it was answered for grails 1.0.x) What files in a Grails 1.3.x project should not be included in version control? See http://grails.org/Checking+Projects+into+SVN - it has a short list of ignores. I would include .settings/ but I tend to keep .classpath and .project in source control because they change with the project. Then again, perhaps it's better simply to run grails integrate-with --eclipse . .gitignore: # Maven output directory target/ # Eclipse Project files .classpath .project .settings/ # OS

How can I get JDOM/XPath to ignore namespaces?

痴心易碎 提交于 2019-12-01 18:25:38
I need to process an XML DOM, preferably with JDOM, where I can do XPath search on nodes. I know the node names or paths, but I want to ignore namespaces completely because sometimes the document comes with namespaces, sometimes without, and I can't rely on specific values. Is that possible? How? I know this question is a little old, but for those viewing this later, you can override a few JDOM default classes to effectively make it ignore namespaces as well. You can pass your own JDOMFactory implementation to the SAXBuilder that ignores all Namespace values passed into it. Then override the

How can I get JDOM/XPath to ignore namespaces?

只愿长相守 提交于 2019-12-01 17:44:40
问题 I need to process an XML DOM, preferably with JDOM, where I can do XPath search on nodes. I know the node names or paths, but I want to ignore namespaces completely because sometimes the document comes with namespaces, sometimes without, and I can't rely on specific values. Is that possible? How? 回答1: I know this question is a little old, but for those viewing this later, you can override a few JDOM default classes to effectively make it ignore namespaces as well. You can pass your own