Simple use of SVN and git

Source: Internet
Author: User

Tag:svn   git    terminal    

All with terminal operation, no client-side assist

. SVN

Find the path you want to save and manipulate

1.check out   (abbreviated CO)

  SVN co path

For example: SVN co svn:// 192.168.0.1/demo/ss

2.add (add File)

SvN add file

For example svn add download.h

Note that after you add the completion file, you want to submit

3. Submit

SVN commit-m "logs"

Note: cannot be empty within quotation marks

4. Update

SVN up

5. View Log

SVN log

6. Update to a version

SVN up-r m (m is version)


. Git

Find the path

1.clone

Git clone path

For example: Git clone Https://192.168.0.1/demo/ss.git


2. Create a local branch

Git init

3. Pull the remote project into the local

git pull Origin master

may require you to enter your git username and password, enter

4.git add

git add file 

Note: The general addition is completed to commit and then pushed to the remote warehouse

5.git commit-m "Logs"

Note: cannot be empty in quotation marks

6. Push to remote warehouse

Git Push-u Origin master

copyright notice: This article for Bo Master original article, without Bo Master permission not reproduced.

Simple use of svn and git

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.