Branch instructions

Master // Main branch, usually used for release dev // development branchCopy the code

Create a version

Git clone 'urlCopy the code

Code operation

Git add. // Add all the changed files to the staging area. Git add 'file' // Add the specified files to the staging area Git rm --cachen 'file' // Git rm --cachen 'file' // Git reset --hard HEAD git checkout HEAD 'file' // Git rebase 'branchName' git rebase 'branchName' git rebase 'branchName' // Git fetch git remote -v git remote show 'remoteName' git remote add 'remoteName' 'url' // Adds the remote version libraryCopy the code

See the history

Git log -p 'file' // To view the commit history of a specified file git log -p 'fileCopy the code

branch

Git branch / / show all local branch git checkout 'branch | | tag' / / switch to the specified branch or tag git branch 'branchName / / to create a new branch git branch - d Git tag 'tagName' git tag -d 'tagName' git tag -d 'tagName' git tag -d 'tagNameCopy the code