The use of Git

Source: Internet
Author: User

http://rogerdudler.github.io/git-guide/https://www.atlassian.com/git/tutorials/

--------------------Ssh-keygen-t rsa-c "***@***.com (email)"CD. SSHSubl id_rsa.pub after adding key to the pageOrSsh-keygen-t rsa-c "***@***.com (email)"Cat ~/.ssh/id_rsa-----------------------------------------------# Set User namegit config--global user.name ' * * * (name) ' # Set User Emailgit config--global user.email ' ***@***.com (email) ' # Set File modegit config--global core.filemode false # Set Content Editorgit config--global core.editor vim # Set Diff toolgit config--global merge.tool vimdiff # Set UI Colorgit config--global color.ui auto Cd..CD traning/---The folder you built yourselfgit clone [email protected]***.com.cn:projectname/***.git (Project path, GIT project will be provided)git clone-b Develop [email protected]***.com.cn:projectname/***.git------------------------------------------------Revert to the previous state: git reset--hard origin/masterLsCD Folder/git statusGit stashGit pull origin DevelopGit stash popGitgGit commit-m ""Git push Origin Deveop-------------------Use only when you own a branchGit add-agit commit-m "comment ..."Git pull-rGIT Push Origin * * * (name)-----------------------------------------# Create BranchGIT Branch * * * (name)git config--global user.name * * * (name)------------------------------------------ #将develop刚提交的代码插到mast On the ER branch git stash on develop branch, then git status check, git checkout Mastergit Branch Branch, confirm on Maste branch git Pull-r then git pull-r confirm git Cherry-pick b0f1878ee0f3d08669c2bb9094eaf6a534b2dd3d you in Develop branch modified plug to master branch GITG check whether to submit (with the master other code on the line) git push Origin Master git branchgit checkout Develop git statusgit stash popgit Branch

Use of Git

Related Article

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.