MKDIR:XX (Create an empty directory XX refers to the directory name)
PWD: Displays the path to the current directory.
Git init turns the current directory into a manageable git repository, creating a hidden. git file.
git addxx add xx files to staging area.
Git commit–m "XX" commits a file –m followed by a comment.
Gitstatus View Warehouse Status
git diff xx View xx file modified those content
Gitlog View History
Git reset--hard + version number back to deleted version location
git reset--hard head^ or Gitreset--hard head~ back to previous version (if you want to fallback to 100 versions, use Git Reset–hard head~100)
Catxx View xx file contents
Gitreflog The version number ID of the view history
Git checkout-xx The xx file in the work area of the changes are all revoked.
git rmxx Delete xx file
git rm xx--cached withdraws staging Area (this file is not monitored)
Git remote add originhttps://github.com/tugenhua0707/testgit associated with a distant library
Git push origin master git pushes the master branch to the remote branch corresponding to the remote library
Git push–u (not needed for the first time with-u) originmaster push the current master branch to the remote library
Git clonehttps://github.com/tugenhua0707/testgit cloning from a remote repository
git checkout–b dev Create dev branch and switch to Dev branch
Git branch view all current branches
Git checkout master switches back to the master branch
Git mergedev merges the Dev branch on the current branch
git branch–d dev Delete Dev branch
GIT branch name to create a branch
Git stash to hide the current job and resume work after resuming the site.
Git stash list view all hidden file lists
Git stash apply to recover hidden files, but the content is not deleted
git Stash Drop Delete file
Git stash pop recovers files while also deleting files
Git Remote to view information
Git remote–v View details of remote libraries
git basic common commands