Skip to content

Instantly share code, notes, and snippets.

@jboursiquot
Created December 19, 2012 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jboursiquot/4337190 to your computer and use it in GitHub Desktop.
Save jboursiquot/4337190 to your computer and use it in GitHub Desktop.
SVN ignore at the command line
(Source: http://blog.bogojoker.com/2008/07/command-line-svnignore-a-file/)
# ---------------------------------------------------------------------
# Ignore all the .txt files in the /trunk/Blah/ directory
# ---------------------------------------------------------------------
# Go to the directory
cd trunk/Blah/ # The directory with the files
# Start editing the properties for the current directory
svn propedit svn:ignore . # Opens an editor (SVN_EDITOR, EDITOR)
# Add the following value with a new line, save, and exit:
*.txt
# See that things worked
svn propget svn:ignore . # So you can see the properties
svn status --no-ignore # You should see an 'I' next to the ignored files
# Commit
svn commit -m "New Ignores" # You must commit the new property change
# ---------------------------------------------------------------------
# Ignore a single file secret.txt in the /trunk/ directory
# ---------------------------------------------------------------------
# Go to the directory
cd trunk/
# Add just the single file to the current directories ignore list (like above)
# Note the dot at the end of the command is important
svn propset svn:ignore secret.txt .
# See that things worked
svn propget svn:ignore . # Notice the single file was added to the list
svn status --no-ignore # You should see an 'I' next to the ignored files
# Commit
svn commit -m "Its secret" # You must commit the new property change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment