Version Control tool (SVN,GIT) __ Version control tools

Source: Internet
Author: User
Tags svn version control system
One, SVN
SVN (Apache Subversion) is an open source version control tool that uses a branching management system relative to RCS and CVS. is its advantage. Material Reference: Rookie Tutorial-svn.
Use:
Server side:
A. Creating a user
B. Creating a new warehouse (version library)
C. Import the initialization project version to the new version library
Client:
A. Checkout, update
B. Implementing code writing, modifying operations in checked out working directories
C. Submitting the modified code to the Server version library
D. File conflicts need to be resolved if there is a file conflict during the submission (usually merged with colleagues from the conflicting party)

Two, GIT

Git is an open-source, distributed version control system. Unlike the common version control Tools CVS, Subversion, Git uses a distributed version library without server-side software support.
Material Reference: Rookie Tutorial-git.
The git version is stored in the GitHub. And GitHub is a warehouse of code on line, which is more flexible and convenient than other version control tools that require support from customer service side.
Use:
1. Install Git-bash
2. Global configuration
$ git config--global user.name "Runoob"
$ git config--global user.email test@runoob.com
Go to the project directory (right--->git bash here in the project directory)
A. Creating warehouses (version Libraries):
B. Adding files to the cache
Syntax: git add <file>
The git add command adds the file to the cache (staging area)
Git status--View status
Git reset head-clears the cache resources in the staging area
C. Submit staging cache resources to a version library:
Syntax git commit-m "message"

Git log--View the submitted version log


To connect to a remote warehouse:
A. Create a local SSH key
Ssh-keygen-t rsa-c "Youremail@example.com"
Youremail@example.com for GitHub registered mailboxes
B. Copy the public key text content from the RSA public key pair to the GitHub account configuration and create the SSH key on the GitHub server
C. Testing:
Ssh-t git@github.com
First three step configuration, on the same computer only need to do once
D. Creating a remote, empty warehouse on GitHub
E. Associating a local warehouse with a remote warehouse:
Git remote add Origin git@github.com:itrainhub/h51705.git
F. Push local warehouse content to a remote repository:
Git push-u Origin Master
Work Flow:
A. Git clone--first clone of a remote warehouse's version library resource
Git pull-Synchronizes version resource updates from a remote repository to a local warehouse
B. Modifying, adding, and deleting resources in the workspace
C. Submit a version library locally
git Add.
git commit-m "xxxxx"
D. Pushing a local version library to a remote warehouse

git push

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.