Archive for the ‘Version control’ Category


SVN add all waiting files

September 7, 2011

If you would like to add all pending files to svn via an svn add command, the following works quite nicely:

svn status | grep ? | sed 's/^? \(.*\)/\1/g' | xargs svn add

And the same for removing missing files:

svn status | grep ! | sed 's/^! \(.*\)/\1/g' | xargs svn rm


Ignoring files with git

November 2, 2010

Git is a great version control system whose greatest advantage is not filling every directory in your project with needless additional files. It just stores things in a top level directory called .git. If you want to remove a project from version control, just delete the .git directory, easy!

To ignore directories in a project and not version them with the rest of the project, create a top level file at the same level as the .git directory called .gitignore and list each folder you want to be ignored in here. You can also ignore file types using the *.file pattern matching.


How to ignore files in a directory under subversion control

June 11, 2010

First thing to realise is that you don’t ignore a file, you set ignored files on the directory.

# ---------------------------------------------------------------------
# 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