Create a new branch in Git
Answer:
In Git, to create a new branch, enter the command below:
# git branch test
To switch to the branch just created, type:
# git checkout test
Switched to branch "test"
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
Create a new branch in Git
Answer:
In Git, to create a new branch, enter the command below:
# git branch test
To switch to the branch just created, type:
# git checkout test
Switched to branch "test"
Find the process ID of a running program
Answer:
The easiest way to get all the process IDs of a running program in Linux, see the following example:
# pidof apache2
29747 29745 29700 29698 29696 29695 29687 29678 29677 29664 23931
How to ignore blank lines when creating the diff of two files
Answer:
By default, the diff command will also compare the blank line of two files.
To ignore them, use:
# diff -B a.txt b.txt
Print SVN log in chronical order
Answer:
To print the svn log in chronical order (according to the time they occured)
# svn log -r1:HEAD
Replace the -r1 with the revision you needed.
Merge changes from trunk into branch in SVN
Answer:
Assume you have created a branch in SVN, which is at revision 125. Now the trunk's head revision is increased to 150, and you want to merge the changes happened in trunk and port to branch also.
In your branch's working folder, execute:
# svn merge -r 125:HEAD_REVISION http://example.com/svn/repos/demo/trunk .
That's it.