Created
December 3, 2012 09:55
-
-
Save hgupta/4193973 to your computer and use it in GitHub Desktop.
Adding multiple files to SVN using CLI
This file contains hidden or 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
# Method 1 | |
svn st | grep "^?" | awk '{ print $2}' | while read f; do svn add "$f"; done | |
# Method 2 | |
svn st | grep "^?" | cut -b 8-1000 | xargs svn add | |
# Method 3 | |
svn add * –force | |
# Method 4 | |
svn add $(svn status | grep "^?" | awk '{print $2}') | |
# Method 5 | |
#! /bin/sh | |
echo "Add the following files to the repository?" | |
for file in `svn status | grep "^?" | awk '{ print $2}' ` | |
do | |
echo -n "$file ? " | |
read decision | |
case "$decision" in | |
y | Y | yes | YES | Yes ) svn add $file;; | |
* ) | |
esac | |
done | |
exit 0 | |
# URL Reference: http://www.arraystudio.com/as-workshop/how-to-add-multiple-files-to-subversion.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment