* Create Library git init // Project initialization
* Add and submit to warehouse git add README.txt // add to git status // View status before submitting git commit -m
"name" // Submit git status // View warehouse status after submission git diff readme.txt // View content changes before and after file changes
* Version fallback // Now? -> past times git log // View history git log --prettry=oneline // View history - Simple version
git reset--hard HEAD^ // Back to previous version git reset --hard HEAD~10 // Back to front 10 Versions //
past times -> Now? git reflog // Get the version number of all submitted commands git reset --hard <commit id> // Go back to the present through version number
* Cache and staging git add file1 file2 file3 // Add to cache git add . // Add all modified files git
commit-m "name" // Submit multiple files at once
* Revocation and deletion of documents // The content of the document is wrong , Need to revert to previous version : You can manually change the commit, You can also go back HEAD^ edition , This paper introduces the third method // -
version1: Not joined to staging area git status // See which file has been changed git checkout --filename // Undo changes to this file
// - version2: Added to staging area git reset --hard HEAD^ // Go back to the previous version first ( Staging area -> work area ) git
checkout--filename // Undo changes to this file rm filename // Remove from workspace filename git rm filename
// Remove from version Library filename git checkout -- filename // Restore deleted filename
* Remote warehouse ssh-keygen -t rsa –C “youremail@example.com” // establish github And local computer SSH Key link
// local ->GitHub git remote add origin address // Associate a GitHub git push -u origin master
// Local content push GitHub( First use ) git push origin master // For each subsequent submission // GitHub-> local git
clone git address git pull origin master// Pull the latest main branch code
* Create and merge branches git checkout -b feature1 // Create and switch to feature1 branch git branch // View all current branches
git checkout master// Switch to main branch git merge feature1 //
merge master and feature1 branch :fast-mode pattern git merge --no-ff -m "merge with no-ff" <name>
// Merge branches , And leave a message that I merged here git branch -d feature1 // delete feature1 branch // Resolve merge conflicts git log
--graph --pretty=oneline --abbrev-commit // Tree view of branches

©2019-2020 Toolsou All rights reserved,
html Writing about cherry trees , Writing about cherry trees It's unexpected Python Cherry tree (turtle The gorgeous style of Library ) Browser kernel ( understand )HashMap Explain in detail java Four functional interfaces ( a key , simple )os Simple use of module Some East 14 Pay change 16 salary , Sincerity or routine ?