-- SVN, Hg, git command comparison

Source: Internet
Author: User
Tags svn update git commands

From: http://www.svn8.com/svnsy/20100112/17492.html

 

SVN, Hg, git Command Control

SVN, Hg, and git commands are similar to SVN, Hg, and git version control systems. Of course, the three systems have their own characteristics and there is no strict correspondence.

BBS. svn8.com

1. The first download, including the source code and version Library:

BBS. svn8.com

SVN checkout http: // path/to/repo repo_name SVN Chinese Network

Hg clone http: // path/to/repo repo_name

BBS. svn8.com

Git glone http: // path/to/repo repo_name or git glone git: // path/to/repo repo_name

Svn8.com

2. download the latest updates on the server:

Svn8.com

SVN update

Www. svn8.com

Hg pull & Hg Update-C

Reference: www.svn8.com

Git pull

Svn8.com

3. Check out a revised version www. svn8.com.

SVN checkout-r <rev>

BBS. svn8.com

Hg Update-c-r <rev>

Svn8.com

Git reset-hard-r <rev>

BBS. svn8.com

4. Added tracked files.

SVN Chinese Network

SVN Add/path/to/File

SVN Chinese Network

Hg Add/path/to/File

Svn8.com

Git Add/path/to/File

Reference: www.svn8.com

4. Remove the tracked File

SVN Chinese Network

Svn rm/path/to/file reference: www.svn8.com

Hg remove/path/to/File

Svn8.com

Git RM/path/to/file svn8.com

5. Generate Patches

Svn8.com

SVN diff> patch_file

Www. svn8.com

Hg diff> patch_file

SVN Chinese Network

Git diff> patch_file

Svn8.com

6. Submit the change to bbs. svn8.com.

SVN commit svn8.com

Hg commit SVN Chinese Network

Git commit

Www. svn8.com

6. view the current status of BBs. svn8.com.

SVN info

BBS. svn8.com

Hg status

Www. svn8.com

Git status

SVN Chinese Network

7. view the revision record svn8.com

SVN log svn8.com

Hg log

Svn8.com

Git log

Reference: www.svn8.com

8. Start the server.

SVN Chinese Network

Svnserve-D www. svn8.com

Hg serve-P 8002 &

Www. svn8.com

Git daemon-base-Path =/path/to/repo-export-all &

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.