Showing posts with label SVN. Show all posts
Showing posts with label SVN. Show all posts

Thursday, 30 June 2016

Top 10 SVN commands with Examples

Top 10 SVN commands with Examples

SVN Checkout
Checkout command is used to download sources from SVN repository to working directory. Syntax: svn checkout/co URL PATH
URL: Full URL of Repot
PATH: Path where you want to get the checkout
svn co .

SVN List
Lists directory and files entries. Syntax: svn list
svn list

Add a new file to SVN repository. Syntax: svn add filename.php
svn add myfile.php
Need to commit
svn commit -m "Adding a myfile.php file" myfile.php

SVN Commit
Commit the file from local to Repo. Syntax: svn commit
svn commit -m "This is message"

SVN delete
Delete a new file From SVN repository. Syntax: svn delete filename.php
svn delete filename.php
Need to comit
svn commit -m "deleting a myfile.php file" myfile.php

SVN up
Upload all file to server. Syntax: svn up
Upload All files
svn up

Upload one file
svn up filename.php

Upload multiple file
svn up filename2.php, filename.php

SVN logs
View the svn log for single file Or mutiple file. View top 25 logs for all files
svn log

View top logs for filename.php
svn log filename.php

check the log for particular revision number
svn log -r 825

SVN Move
Rename or move a file from one directory to another. Syntax: svn move
svn move filename.php newFilename.php

SVN update
svn update command brings changes from the repository into your working copy.
Syntax: svn update
Get all updates
svn update

Get file update
svn update filename.php

Tuesday, 27 October 2015

SVN interview questions and answers

SVN interview questions and answers

Question: What is SVN?
Subversion is an open source control system which is used to trace all the changes made to your source code.

Question: List out what all things should be stored in SVN repository?
  1. Source Code
  2. MySQL Queries
  3. Database Updates
  4. Project regarding important files
  5. Product Documents
  6. Minutes of Metting and Imp Email

Question: How to add SVN file?
svn add filename.php

Question: How to add SVN folder?
svn add foldername

Question: How to get Updates from SVN Repo
svn update

Question: How to delete file from SVN Repo?
svn delete filename

Question: How to get SVN Info?
svn info

Question: How to get SVN Log for a file?
svn log testFile.php

Question: How to check for modifications?
svn status -v PATH

Question: Difference between SVN commit and SVN update?
SVN commit:: Push (upload) the local changes to Repository.
SVN Update:: Get (download) the Repository changes files to local system.

Question: What is use of Revert in SVN?
Revert your local changes.
It have two types
1) Local Revert: It will delete all changes from files which you made after updates and before commit.
2) Repo Revert: Upload the changes to previous Repo.

Question: List out what is the best practices for SVN?
  1. Work from your own local work-space
  2. Commit small autonomous changes
  3. Use comment
  4. Validate the files you are committing, you actually changed
  5. Take Update before commit to the Repo.

Question: How to apply a patch in SVN ?
First we need to "Create Patch" by making changes and generating the .diff file. Then this .diff file can be applied to the new Code base using "Apply Patch".

Tuesday, 31 December 2013

SVN Important Commands

SVN is a software version and revision control system distributed as free software under the Apache. Many companies like Apache Software Foundation, Free Pascal, FreeBSD, GCC, Mono, SourceForge and Google also provides Subversion hosting for their free software projects.

Following are SVN Important Commands

Get the New Checkout, It will get from root folder
$ svn checkout [URL]  

Get the New Checkout, It will get from testfolder
$ svn checkout [URL] [testfolder]  

Get the entire update
$ svn update           

Get the update for testfile.php and testfile.php
$ svn update testfile.php, testfile1.php   

Revert the testfile.php
$ svn update testfile.php

Commit with the Message
$ svn commit - m "message here"

Commit the particular file with Message 
$ svn commit - m "message here" testfile.php

Add a new file
$ svn add testFile1.php
$ svn commit -m "test message" testFile1.php

Remove the existing file
$ svn remove -m "test message" testFile1.php
$ svn commit -m "test message" testFile1.php

SVN Info
$ svn info

Get Help on commit command
$ svn help commit

Get log for a file
$ svn log testFile.php

Get log for particular revisionNumber
$ svn log -r 825

Commit a modification to the file test1.php with the commit message in a file named msg
$ svn commit -F msg test1.php

Thursday, 8 August 2013

GitHub in window 7 | GitHub Commands in Linux

GitHub in window 7 | GitHub Commands in Linux

Setup the GitHub in window machine. GitHub is most widely used repositary in development. Get to know commands to work with github.

Create repository in github
Login to your github account, If not have account please register first.
After login to your github account, Click on "Create new Repo" Icon @top right in header to create new repo.
Add "Repository name" and Description of your new repository.
Public Repository is free and private is paid. so let start with free(public repo)
After clicking on "Create repository", your repository will create.
Save the URL of your repo, It will be similar to ""

Download the console for github
ate/delete files in repo
After download, Install it and Run the "Git Bash"

All command must be executed in sample folder.

Add a file in github through console(First Time)
Open "Git Bash"
Go to folder/directory where you want to keep your files @local system using "Cd" command.
Create a folder and go inside that folder
add a sample file in that folder from UI
execute following commands one by one and add your github username/password they they prompt (In Last)

git init
git add test.php
git config --global "Arun"
git config --global "[email protected]"
git commit -m "test file"
git remote add origin
git push -u origin master

Add a new file in github
add a new file in folder (suppose file name is "arun1.php")
Execute following commands one by one
git add arun1.php
git commit -m "test file arun1.php"
git push -u origin master

Update a file in the github
Change one file and save
Execute the following commands one by one
git add *
git commit -m "updated file"
git push -u origin master

Delete a file
git rm arun1.php
git commit -m "deleted file"
git push -u origin master