GIT version tracking _git

Source: Internet
Author: User
Common commands:--------Git pull Origin developer pull remote developer code to local git branch-a list local branches and far The Process branch (-R is a list of remote branches) GIT status query code state git log View submit logs (plus-5 shows 5 Commi T git branch Check the branch where git checkout developer switch to the developer branch git checkout-b Lyy_demo creates and switches to its own local feature branch (the default current branch to initialize the new branch) git checkout-b lyy_demo charging new and switch to lyy_charging branch (specify branch to Initialize new branch) git branch-d lyy_demo Delete branch git config--global user.name view user name git config--global us              Er.name "Lorie" set user name git config--global user.email "" Set up the mailbox Submission Code trilogy:--------git add modified_file_name Add modified file to buffer pool (or new file) git checkout modified_file_name discard unwanted files git commit-m "some message" Submit * Code to Local                Branch (after Git commits to not see Add File) git merge developer switch to its own branch--"developer code to own branch Git push Origin Lyy_demo Push yourself branching code to remoteThe warehouse creates the merge request on the remote warehouse, developer itself to a version:--------git diff head file to view the difference between the modified file and head git            Diff file View files different git reset--hard head^ recall previous merge Git reset--hard commit version number Recall to the specified commit version git reset add if remote developer is withdrawn to an older version, local or latest version, pull remote code will be rejected, local need res

 ET to the same or older version git reset--hard commit version number

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.