This is the third day of my participation in Gwen Challenge

At work, many people’s companies use Git as a code management tool. I also use Git as a code management tool. The commands I often use can be directly output without thinking, but the commands I rarely use are still hard to remember.

To verify an existing project with Git, first clone the project locally: Git clone [email protected]: XXXXXXXXXX —————— followed by the SSH address

Git checkout – b newBranchName — — — — — — — — — — — — — — — — — — the new branch, Git checkout branchName —————— git checkout branchName -b diff a5ad7383 —————— Switch locally to the node that submits the branch

Git add — — — — — — — — — — — — — — — — — — to change the input to the index git add file. The js — — — — — — — — — — — — — — — — — — only the file file modified gti add entry to the index. —————— Enter all changes

Git commit -m — — — — — — — — — — — — — — — — — — ‘add modification instructions’ commit to save changes to the staging area

Git merge branchName — — — — — — — — — — — — — — — — — — merge branches git merge – no – ff branchName — — — — — — — — — — — — — — — — — — — — no, ff: You can merge the records of the merged branches with the records of the merged branches. Before merging the branches, you must first pull the code from the remote repository to the local and then merge the branches. If you merge the branches first, then pull the code will easily cause conflicts

Git pull — — — — — — — — — — — — — — — — — — to remote code to the local branch of the default pull remote warehouse branch with the same code git pull originName — — — — — — — — — — — — — — — — — — pull remote warehouse branch name originName code

Git push — — — — — — — — — — — — — — — — — — the native code submitted to the remote warehouse in the branches of the same name git push originName — — — — — — — — — — — — — — — — — — the native code submitted to the remote warehouse originName branch name

Git fetch —————— Updates remote branch information locally

Git branch – a — — — — — — — — — — — — — — — — — — look at the local branch – a view all branch git branch – d branchName — — — — — — — — — — — — — — — — — — delete local branch – d – d is forced to delete the git Push origin –delete brnachName —————— delete remote branches

Git reset HEAD ^ — — — — — — — — — — — — — — — — — — back on all the content to a version of git reset HEAD ^ TXT. Js — — — — — — — — — — — — — — — — — — the fallback TXT. Js file version to the previous version of git reset A5ad7383 —————— Rollback to the specified version

Git reflog —————— view all commits

Reference: backlog.com/git-tutoria… www.runoob.com/git/git-res…