PS D:\myProjects\manage> git log
commit 5c102460e6f7e2680052572fad504aa5c8da5772 (HEAD -> master, origin/master, origin/HEAD)
Author: codebug <codebug@outlook.com>
Date: Fri Apr 2 10:05:16 2021 +0800
codebug add
commit 96730aa52dbd430b380ef62966bbe188b9752164
Author: yhl <1254776513@qq.com>
Date: Thu Apr 1 18:24:24 2021 +0800
add
:...skipping...
commit 5c102460e6f7e2680052572fad504aa5c8da5772 (HEAD -> master, origin/master, origin/HEAD)
Author: codebug <codebug@outlook.com>
Date: Fri Apr 2 10:05:16 2021 +0800
codebug add
PS D:\myProjects\manage> git checkout 4f0c057fd5e3b3f3cf5b55c6b58a436052f10510
Note: switching to '4f0c057fd5e3b3f3cf5b55c6b58a436052f10510'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
PS D:\myProjects\manage> git switch -c changeBefore
Switched to a new branch 'changeBefore'