Thursday, 29 November 2012

SVN Commands for Mac OSX

Hello everyone, Since last few days I was struggling to add a folder to my svn branch .
And Finally .. I found a solution . So , I am sharing with you people.

1.  To add directory in svn 

   Go to terminal and in respective directory
$ mkdir directoryToCommit

$ touch directoryToCommit/test.txt

These two lines will create one directory named "directoryToCommit"  

and one empty file named "test.txt"  .

Let's import this project into the repository. Type in your terminal, by replacing 'YourServerName' with your own svn server name or IP:
$ svn import directoryToCommit 

svn://YourServerName/branches/directoryToCommit -m "testImport"

We have just imported the folder 'directoryToCommit' into the repository 'svn://YourServerName/branches/'. Each version in the repository is called a "revision" and is identified by a unique number. Always provide a short message ('-m') of the changes you made to the repository like we just did!

2.   To add retina image in svn : 
    I was facing issue related to committing retina images (default@2x.png) to svn .

This is due to internal path recognizers in SVN. It expects the last "@" symbol to specify a revision. This is easily corrected by adding an "@" symbol to the end of your file:

Example : 
             svn add default@2x.png@

3.  To Change SVN root path 

      To change svn root path in svn you have to use following command

      svn switch --relocate YOUR_OLD_SVN_URL  YOUR_NEW_SVN_URL

No comments:

Post a Comment