Pages

Thursday, January 9, 2014

How to add a file in local file system to SVN repository?

Assume you have folder named "foldername" in your local file system and you need add that folder with its content to SVN repository.

Following operation is a client side operation and it won't have any impact on the server:
svn add foldername

Once you commit files using following command, files, folders within the given folder will be added to the repository:
svn commit foldername

You can do both of the above given commands in one step using "svn import" as well.

Additional notes:

if you want to get rid of commit message in svn.commit.tmp, use the following command:
svn commit Sensefy -F svn-commit.tmp

If you get the following error:
svn: Commit failed (details follow):
svn: Could not use external editor to fetch log message; consider setting the $SVN_EDITOR environment variable or using the --message (-m) or --file (-F) options
svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR are set, and no 'editor-cmd' run-time configuration option was found

use following command to set vi editor as default editor.
export SVN_EDITOR=vim

1 comment:

  1. Your blog has given me that thing which I never expect to get from all over the websites. Nice post guys!

    ReplyDelete