Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore Files and Directories in Subversion (SVN)
- Loading branch information
1 parent
6571e6e
commit 2b19db1
Showing
2 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
content/entries/howto-ignore-files-and-directories-in-subversion-svn.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Subversion is ~~fun~~ lame. Especially when it tries to commit intermediate build files and other junk you want to keep out of your SVN repository. In my environment, Ant is configured to place intermediate build files into my build/ directory. The final product is then packaged up and placed into my `dist/` directory. So, I need SVN to ignore everything inside of my build/ directory since the contents of this folder are going to change on every build. | ||
|
||
Meet `svn propedit svn:ignore`: | ||
|
||
``` | ||
#/> svn propedit svn:ignore build | ||
#/> svn -m "ignoring build" commit build | ||
``` | ||
|
||
When you run `svn propedit`, your local text editor will open (usually `vi`) which will allow you to specify a series of file names to ignore under `build/`. If you want to ignore all files and folders, just enter a single * wildcard character, save, and commit: | ||
|
||
``` | ||
* | ||
``` | ||
|
||
Or, maybe you want to ignore just `.class` files: | ||
|
||
``` | ||
*.class | ||
``` | ||
|
||
Of course, if you want to use another editor like `emacs` to set your ignore properties, you can do so by exporting `SVN_EDITOR` before running `svn propedit`: | ||
|
||
``` | ||
#/> export SVN_EDITOR=emacs | ||
``` | ||
|
||
Cheers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters