Get the App
SLTechnology News&Howtos  ›  Servers  › 

A few small commands about Git

Shulou Source: shulou.com Published: 2022-06-02 23:05:33 11月15日 Update

Git status view code status git diff readme.txt view modified file git reset-- hard head ^ rollback to the previous version git reset-- hard HEAD~100 fallback to the first 100th version git reset-- hard 1094a specifies the version to which the fallback (1094a is the version number) git checkout-- file can discard changes to the workspace git reset HEAD can undo changes to the staging area (unstage) Reposition the workspace git diff HEAD-- the readme.txt command can see the difference between the latest version in the workspace and the version library git rm test.txt delete the files in the version library git checkout-- the files in the readme.txt recovery version to the workspace

Note:

Modified: readme.txt

Readme.txt has been modified, but no changes are ready to be submitted

Tags: Version workspace work file code command status storage area preparation life Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Apple Microsoft vpn NVidia