Overview using git (study Note 1)

Source: Internet
Author: User
Use git overview (study Note 1) to configure gitconfig -- globaluser after git installation. name & quot; // The configuration name of the global domain is namegitconfig -- globalusre. email & quot; name@email.com & quot; // global use git one overview (study Note 1) git-installed configuration git config -- global user. name "name" // The configuration name of the global domain is name git config -- global usre. email "name@email.com" // global domain configuration email address for name@email.com git config -- global color. ui "auto" // The global domain configuration color is automatic git config -- global -- edit (-e) // edit gl Configure git config -- global -- list (-l) in the obal domain) // view the global domain configuration mkdir mysite // create the mysite project directory cd mysite // enter the mysite project working directory git init // git initialize the project directory git add index.html file under the Directory. // use git addadd index.html to the index of the project Library (also called the temporary storage area) git commit-m "add in Hello World HTML. "// use git commit again to submit to the version library of the file git log // view the commit record git commit-amend // git only provides modifications to the last commit record git branch // view the branch git branch RB_1.0 master // Create an RB_1 based on the master branch. The 0 branch supervisor modifies index.html and then git add index.html and git commit-a master branch have changed git checkout RB_1.0 // switch to the RB_1.0 branch. Is the content before the change of the main branch. you can use the git logtail log and the index.html file to change the content before the previous modification. Modify index.html and then git add index.html and git commit-a. The modification here is based on RB_1.0 and has nothing to do with the master branch ;; release the git tag 1.0 RB_1.0 // add the 1.0 tag git checkout master git rebase RB_1.0 to the current position of the branch RB_1.0 /// base the master branch to the RB_1.0 branch. The results can be viewed by viewing the git log and cat index.html files. Git branch-d RB_1.0 // The RB_1.0 branch has no function. you can delete the RB_1.0 branch. if you need to modify or patch this version 1.0, you can. Git branch RB_1.0.1 1.0 // create a branch named RB_1.0.1 from the 1.0 tag. Git checkout RB_1.0.1 // go to this branch and modify it. ;; Package git archive -- format = tar -- prefix = mysite-1.0/1.0 | gzip> mysite-1.0.tar.gz // tar package git archive -- format = zip -- prefix = mysite-1.0/1.0> mysite-1.0.zip // zip package;; git clone git: // github.com/tswicegood/mysite.git mysite-remote
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.