Basic SVN command for web developers

SVN Checkout Command: This SVN command will setup all files from the server to your local folder. Basically this command is used to bind and synchronize your local folder with all the files and folder from SVN server directly. So if you are going to setup a project on SVN server then this is the first command after setting up the SVN server for your project.
Command: svn checkout or svn co FOLDER_LOCATION
Demo Output:

It will show the list of files that is coming to your folder from repository

SVN Add Command: This Command is used when we create any new file which we want to send to SVN repository. With this command we just let svn server know that we have created this new file which will be send to svn server. Untill we run this command SVN server wouldn’t recognize this file.

Command: SVN ADD SVN_FILE_FOLDER_NAME

SVN Propset Command: When we create any file or folder with this command we need to tell the SVN server to apply properties to the file in places that have keywords in a special format such as $Date: 2012-07-29 17:46:27 -0600 (Sun, 29 Jul 2012) $.

Command: svn propset svn:keywords “Date LastChangedBy” /path/to/filename.xml

SVN Commit Command: This command recursively send your file to SVN server. It will commit changed files, added files, and deleted files. With this command –m option to pass a log message to the command

Command: SVN Commit FILE_FOLDER_LOCATION –m “log message”

SVN Update Command: This command is used to sync SVN server with local repository path. If you have made local changes, it will try and merge any changes on the server with your changes on your machine.

Command: SVN update/up
SVN DIFF COMMAND : This command is used to show difference/changes made on one file into two different revision.

Command: svn diff -r revision1:revision2 FILENAME

For example: svn diff -r 168:169 test.xml

SVN MOVE COMMAND : This command moves a file from one directory to another or renames a file .

Command: svn move SRC DEST

The following two tabs change content below.

Chandra Shekhar

GCP Architect
Chandra Shekhar Pandey is Google certified Cloud engineer, I am Magento2 Trained developer. Having huge experience in designing cloud solution. I have around 12 years of experience with world enterprise IT companies and fortune 500 clients. During my architecture design I am always caring about high availability, fast performance and resilient system. From the programmer background I have huge experience in LAMP stack as well. Throughout my carrier I have worked on Retail, E-Learning, Video Conferencing and social media domain. The motive of creating cutehits was just to share the knowledge/solutions I get to know during my day to day life so that if possible I can help someone for same problems/solutions. CuteHits.com is a really a very effort for sharing knowledge to rest of the world. For any query/suggestion about same you can contact me on below details:- Email: shekharmca2005 at gmail.com Phone: +91-9560201363

Latest posts by Chandra Shekhar (see all)

You may also like...