Common svn and git commands

Source: Internet
Author: User
Tags svn update git commands

Common commands of svn and git are commonly used: 1. git pull // indicates updating the latest code on the server to the local device. 2.1. git add file path strength and file name 2.2, git commit-m "comment" 2.3, git push // the above three commands complete code submission to the server. 3. git clone git @ code strength on the server // download the code from the server to the local machine 4. git config -- global user. name username // configure username 5, git config -- global user. email user_email // you only need to execute the preceding two email addresses once. 6. ssh-keygen-t-rsa-B 2048 // generate the file generated by the ssh key in ~ /. Ssh/id_rsa.pub 7, git branch-a // view all git branches 8.git branch-B branch names // create git branch 9, git checkout branch name // switch branch 10, git checkout file path // download the file to the local machine 11, git push origin branch name // submit updates to branch 12, git status 13, git revert 14, git submodule init 15, git submodule update svn: svn add file path strength // use git revert file path strength when adding files // cancel svn ci-m "comment" change file path strength and file // update local code to the server svn update/ /update the latest server code to the local device, (-r) You can specify the version to update. Svn-import-m "comment ". /uboot http: // 192.168.1.6/svn/server path/uboot // upload bsp to the server svn co http: // 192.168.1.6/svn/server path // download the server code to the local device. You can specify the version to download. Svn ls http: // 192.168.1.6/svn/server path // view the server code directory and file svn log // view the svn log svn merge-r 46: 54 http: // 192.168.1.6/svn/server path // synchronize version 54 on the server to the local 46 svn cp http: // 192.168.1.6/svn/server path http: // 192.168.1.6/svn/Server Path 1 // create the svn branch svn diff-r 45: 46 // compare the differences between version 45 and 46.

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.