Take git / GitHub notes


GitHub review

Review agreement:
        The prefix of blocker indicates that it will affect the function and must be modified
        Optional prefix, indicating recommendation
        The prefix of question indicates that you have doubts about the code
WIP --   work in progress, do not merge yet. // under development
Lgtm -- looks good to me. // riview finishes other people's PR, no problem
Ptal -- please take a look. // take a look at it for me. Generally, you ask others to review your pr
CC -- carbon copy // generally means to copy to others
RFC   --   request for comments. // I think this idea is very good. Let's discuss it together
IIRC   --   if I recall correctly. // if I remember correctly
ACK   --   acknowledgement. // I confirm or accept it, and I admit it
NACK / NAK -- negative acknowledgement. // I disagree


Feature: new feature
Fix: fix bug
Docs: only the documents have been modified, such as readme, changelog, configure, etc
Style: just modify the space, format indentation, all good, etc. without changing the code logic
Refactor: code refactoring without adding new functions or fixing bugs
Perf: optimize related, such as improving performance and experience
Test: test case, including unit test, integration test, etc
Chore: change the construction process, or add dependent libraries, tools, etc
Revert: rollback to previous version

Git command

Learning website
When a merge conflict occurs, undo the merge operation. If you don't want to resolve the conflict, you want to undo the merge
    git merge --abort
    git rebase
The GIT cherry pick command is used to apply the specified commit to other branches.
    For example, the local git warehouse pointer now points to the master branch; There are multiple commits on the development branch; Now you need to merge some commitments on the development branch into the master; You can use this command
Modify the problem on the remote branch, such as live
    Git branch - a view remote branches
    Git checkout remotes / upstream / live separate remote branches locally (a temporary branch will appear locally)
    Git checkout - B fixlivebug cuts out a new branch from the zero time branch to modify the problem on live
Git status      
    ---Check local
Git add -A     
    ---Save local to cache
Git commit - M 'version information'  
    - store the cache to the local version repository
Git commit - M 'first line version information' - M 'second line version information'
    - modify version information
Git commit - amend - M 'modify the submission reason of the latest record'
    - modify the latest record
Git remote -v    
    - check the addresses where the current project can be pulled and pushed
Git remote add upstream remote warehouse address  
    - add remote upstream 
Git checkout - B branch name   
    - create a local branch and switch to the created branch
Git checkout branch name  
    - switch branches
Git branch   
    - view local branches
Git branch - D branch name   
     - delete local branch
Git push origin branch name
    - push the local branch to the specified branch of origin
Git push origin: branch name 
    - delete the specified branch at the far end of origin
Git reset - hard version number
    - rollback the specified version
Git stash
    - save the currently modified code
Git stash apply
    - apply the last modified saved code
Git stash clear
    - empty git stack
Git fetch upstream
    - view remote branch updates
Git merge upstream / branch name
    - specified branch at the far end of merge upstream
Git pull upstream branch name
    - this method is the combination of the above two methods, and also pulls the specified branch at the far end of the upstream
Git reflog 
    - record all local modification submissions
git reset HEAD~1
    ---Pull the latest file submitted to the version library to the staging area, and the operation does not affect the workspace