Git is more and more popular now so I plan to write a note about it. However, there already exist many great articles on the Internet.
1. Git - SVN Crash Course
2. http://git-scm.com
3. Everyday GIT With 20 Commands Or So
Related Blog :
SubVersion Quick Guide
Showing posts with label Version Control. Show all posts
Showing posts with label Version Control. Show all posts
Saturday, August 30, 2008
Wednesday, June 4, 2008
Diff and Patch
發佈原始碼更新最常使用的工具是 patch 和 diff. 一開始建立兩個內容一樣的目錄“original directory”和“working directory”,然後在“working directory”中加上我們的修改。例如:
[]$ tar zxvf linux-2.6.24.tar.gz
[]$ mv linux linux-2.6.24-orig
[]$ tar zxvf linux-2.6.24.tar.gz
[]$ mv linux linux-2.6.24
在linux-2.6.24 目錄下修改。完成後利用下列指令來產生修補檔。
$ diff -Naur -X dontdiff linux-2.6.24-orig linux-2.6.24 > kernel.patch
Other instructions:
[]$ cd linux-2.6.24-orig
[]$ patch -p1 < ../2.6.25.patch
[]$ cd ..
[]$ mv linux-2.6.24-orig linux-2.6.25
[]$ cd linux-2.6.24
[]$ patch -p1 -R < ../kernel.patch
[]$ patch -p1 < ../2.6.25.patch
[]$ cd ..
[]$ mv linux-2.6.24 linux-2.6.25
[]$ cd linux-2.6.25
[]$ patch -p1 < ../kernel.patch
[]$ tar zxvf linux-2.6.24.tar.gz
[]$ mv linux linux-2.6.24-orig
[]$ tar zxvf linux-2.6.24.tar.gz
[]$ mv linux linux-2.6.24
在linux-2.6.24 目錄下修改。完成後利用下列指令來產生修補檔。
$ diff -Naur -X dontdiff linux-2.6.24-orig linux-2.6.24 > kernel.patch
Other instructions:
[]$ cd linux-2.6.24-orig
[]$ patch -p1 < ../2.6.25.patch
[]$ cd ..
[]$ mv linux-2.6.24-orig linux-2.6.25
[]$ cd linux-2.6.24
[]$ patch -p1 -R < ../kernel.patch
[]$ patch -p1 < ../2.6.25.patch
[]$ cd ..
[]$ mv linux-2.6.24 linux-2.6.25
[]$ cd linux-2.6.25
[]$ patch -p1 < ../kernel.patch
Wednesday, July 25, 2007
Subversion Quick Guide
# For administrator
# SVN Server: (example IP address:192.168.1.100)
# Create a new project - XXXXX
[]# svnadmin create /home/svn/repos/XXXXX
[]# chown -vR apache:svngroup /home/svn/repos/XXXXX
# Change to your home directory
[]# mkdir XXXXX
[]# mkdir XXXXX/branches
[]# mkdir XXXXX/tags
[]# mkdir XXXXX/trunk
[]# svn import XXXXX/ file:///home/svn/repos/XXXXX/ -m "Initial repository layout"
# Now, the depositary is ready for developer to import their own source code.
# For end-user, programmer, developer
# SVN Client:
# Check-out the source code
[]# svn co http://192.168.1.100/svn/repos/XXXXX/
# Add/Edit/Delete/Copy/Move/..... your original source code to ./XXXXX/trunk/
# Check-in your source code
[]# svn commit
# Update your local repository
[]# svn update
# Check log
[]# svn log
# Check information
[]# svn info
# Check-out revision R??
[]# svn co -r?? http://192.168.1.100/svn/repos/XXXXX/
# Tag it
[]# svn copy -m "tagging the 1.0 release." http://192.168.1.100/svn/repos/XXXXX/trunk \
http://192.168.1.100/svn/repos/XXXXX/tags/release-1.0
# Check-out
[]# svn co http://192.168.1.100/svn/repos/XXXXX/tags/release-1.0
# Create a lock
To set a lock on a directory tree simply create a property on a directory called lock. Then you must commit the property to make it take effect.
[ ]# svn propset lock TRUE trunk/project
[ ]# svn commit trunk/project
# Delete a lock
To remove a lock simply delete the lock property and then commit:
[ ]# svn propdel lock trunk/project
[ ]# svn commit trunk/project
RapidSVN is a cross-platform graphical SVN client written in C++ using the wxWidgets framework.
Meld is a graphical diff and merge tool, it can compare two or three files which you can also edit in place at the same time.
# SVN Server: (example IP address:192.168.1.100)
# Create a new project - XXXXX
[]# svnadmin create /home/svn/repos/XXXXX
[]# chown -vR apache:svngroup /home/svn/repos/XXXXX
# Change to your home directory
[]# mkdir XXXXX
[]# mkdir XXXXX/branches
[]# mkdir XXXXX/tags
[]# mkdir XXXXX/trunk
[]# svn import XXXXX/ file:///home/svn/repos/XXXXX/ -m "Initial repository layout"
# Now, the depositary is ready for developer to import their own source code.
# For end-user, programmer, developer
# SVN Client:
# Check-out the source code
[]# svn co http://192.168.1.100/svn/repos/XXXXX/
# Add/Edit/Delete/Copy/Move/..... your original source code to ./XXXXX/trunk/
# Check-in your source code
[]# svn commit
# Update your local repository
[]# svn update
# Check log
[]# svn log
# Check information
[]# svn info
# Check-out revision R??
[]# svn co -r?? http://192.168.1.100/svn/repos/XXXXX/
# Tag it
[]# svn copy -m "tagging the 1.0 release." http://192.168.1.100/svn/repos/XXXXX/trunk \
http://192.168.1.100/svn/repos/XXXXX/tags/release-1.0
# Check-out
[]# svn co http://192.168.1.100/svn/repos/XXXXX/tags/release-1.0
# Create a lock
To set a lock on a directory tree simply create a property on a directory called lock. Then you must commit the property to make it take effect.
[ ]# svn propset lock TRUE trunk/project
[ ]# svn commit trunk/project
# Delete a lock
To remove a lock simply delete the lock property and then commit:
[ ]# svn propdel lock trunk/project
[ ]# svn commit trunk/project
GUI SVN Client and Diff Viewer
RapidSVN is a cross-platform graphical SVN client written in C++ using the wxWidgets framework.
Meld is a graphical diff and merge tool, it can compare two or three files which you can also edit in place at the same time.
Subscribe to:
Posts (Atom)