Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Dec 282011
 

Show changed files with git log

Answer:

In svn, you can use

# svn log -v

to show a detail list of changed files in each commit.

In git, you can use to have similar effect:

# git log --stat.

Nov 242011
 

Show svn log for a particular folder

Answer:

To show the svn log for a particular folder, just need to use..

# svn log /data/foo

------------------------------------------------------------------------
r1935 | [email protected] | 2011-11-23 19:05:43 +0800 (Wed, 23 Nov 2011) | 1 line

Fixed the crash issue (Jira 2001)
------------------------------------------------------------------------
r1934 | [email protected] | 2011-11-23 18:47:54 +0800 (Wed, 23 Nov 2011) | 1 line

Added missed files
Oct 072011
 

How to merge a branch back into trunk using SVN

Answer:

To merge a branch back into the trunk using SVN: (Assume your local corresponding folders are branch and trunk)

1. Get the revision number at which the branch was created

# cd branch
# svn log --stop-on-copy

2. Get the head revision number of your trunk

# cd trunk
# svn update

3. Merge in action

# cd trunk
# svn merge -r <BRANCH_CREATION_REVISION_NUMBER>:<HEAD_REVISION_NUMBER>
               http://example.com/svn/repos/demo/branches/<MY_BRANCH> .
Oct 032011
 

Revert all local changes in SVN

Answer:

Too revert all local changes in your current SVN repository, you can run the following command

# svn st -q | awk '{print $2;}' | xargs svn revert

That is it.

Aug 092011
 

Move a directory in a subversion repository

Answer:

To move a directory in a subversion repository, the method we used is very similar to rename a directory under an UNIX shell.

# svn move -m "Move a directory" http://example.com/svn/repos/demo/trunk/foo http://example.com/svn/repos/demo/trunk/bar