Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the common commands in Git

Shulou Source: shulou.com Published: 2022-06-01 13:43:45 09月17日 Update

Editor to share with you what commands are commonly used in Git, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Git is a free, open source distributed version control system for agile and efficient handling of any project, small or large.

Create a version library $git clone # Clone a remote version library $git init # initialize local version library modifications & submit $git status # View status $git diff # View changes $git add. # tracking all changed files $git add # tracking specified files $git mv # file renaming $git rm # deleting files $git rm-- cached # stop tracking files but not deleting $git commit-m "commit message" # submit all updated files $git commit-amend # modify the Last submission View submission History $git log # View submission History $git log-p # View the submission History of the specified document $git blame # View the submission History of the specified document as a list undo $git reset-hard HEAD # undo changes to all uncommitted files in the working directory $git checkout HEAD # undo changes to specified uncommitted files $git revert # undo specified commit branches and tags $git branch # display all local branches $git checkout # switch to the specified branch or label $ Git branch # create new branch $git branch-d # Delete local branch $git tag # list all local tags $git tag # create tag based on latest submission $git tag-d # Delete tag merge and derive $git merge # merge the specified branch to the current branch $git rebase # derive the specified branch to the current branch remote operation $git remote-v # View the remote version library information $git remote show # View the specified remote version library information $git remote add # add the remote version library $git fetch # download code from remote library $git pull # download code and quickly merge $git push # upload code and quickly merge $git push # delete remote branch or tag $git push-- tags # upload all tags

These are all the contents of this article entitled "what are the commonly used commands in Git?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Branches files tags versions content history code articles tracking commands commonly used information agile less distributed most control systems ways more status Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Redmi macOS Shulou Technology Huawei