Cd/f/xx Enter the XX folder of f disk
PWD Displays the current directory
mkdir name creates the name folder in the directory where it is now located
Git init creates a repository in the current directory
git add Name.txt commits name.txt to the workspace
Git commit-m "Repository information" to submit files to the warehouse
Git status grasps the state of the current warehouse
git diff name.txt see the different of this file
git log View history
git log--pretty=oneline streamlined history
Gir reflog view command history
git reset--hard head^ back to previous version
git reset--hard 3333 back to 3333 in historical version
Cat Name.txt View then file
Git checkout--name.txt undo all changes to name
git reset HEAD name.txt git checkout-name.txt undo all changes to the file that the add submitted
RM name.txt To delete file Manager files
git rm name.txt Delete a file that has already been submitted
Ssh-keygen-t rsa-c "Mailbox" to create SSH Key
Git remote add origin http://github.com/... Connect the local repository to the corresponding GitHub repository
Git push-u origin master pushes all contents of the local library to the remote library
git clone http://github.com/... Copy from the appropriate remote library to the local library
Git checkout-b name to create a branch and convert it to a branch
GIT branch name Create name Branch
Git checkout name conversion to name branch
git branch-d name Delete name Branch
Git merge name Merge name branch to current branch
git log--graph--pretty=oneline--abbrev-commit to draw a branch merge case
git merge--no-f-M "Version Introduction" name prohibits quick merging of current branches
Git stash storage now on the job site
Git Stash list work site lists
git stash apply [email protected]{0} Work site recovery, do not delete the saved work site, [email protected]{0} represents a work site
git stash drop [email protected]{0} Job Site deletion, [email protected]{0} indicates a work site
Git stash pop recovery and delete work site
git branch-d name forcibly deletes the name branch
Git Remote View information
git remote-v View Remote library details
Git checkout-b branch-name origin/branch-name create a local branch corresponding to a branch of the remote library
Git push origin master pushes the main branch to the remote library
Git push Origin dev pushes the dev branch to the remote library
Git branch--set-upstream Dev Origin/dev associates the local dev branch with the dev branch of the remote library
git tag name is used to create a new label, default to head
git tag View all tags
git tag-a tagname-m "tag Info"
Git-s tagname-m "PGP signature Tag"
git log--pretty=oneline--abbrev-commit find history submission
git tag tagname 33333 tag for commit ID 33333
Git show tagname view tagname tags
git tag-d tagname Delete tagname tags
Git push origin tagname push tag to remote
Git push origin--tags pushes all the non-pushed tags to the remote
git tag-d tagname delete a local label
git push origin:refs/tags/tagname and push remote, delete remote tags
Use git commands under Windows