Tag Management to use Git in

First, the principle

  1. The initial project to build a framework
  2. Knock Code (perform one function)
  3. After completion of a function using a tag Tag Git
  4. Back to the Original framework
  5. Knock Code (complete another function, and so on)

Second, use the steps

(A) preparation phase

  1. The initial project to build a framework
  2. Creating a warehouse: $ git init
  3. Add files to the repository: $ git add.
  4. The initial project framework will be submitted to the warehouse: $ git commit -m "comment information"
  5. Establish a remote git repository
  6. Local warehouse and associated remote repository: $ git remote add origin HTTPS source file
  7. The local repository pushed to the remote repository: $ git push -u origin master

 (B) the learning phase

  1. 1 thematic learning code Qiaowan it will be submitted to the local repository.
  2. Add tag to git: $ git tag tag title.
  3. View all current repository git: $ git tag

 (C) fallback code learning another topic

  1. Roll back code to the initial version of the project: $ git reset --hard version number
  2. Code rollback to any git: $ git checkout tag title

III clone codes

$ Git clone source address

Guess you like

Origin www.cnblogs.com/linwussgg/p/11521044.html