Visit https://gitforwindows.org/? Download an installation package, go all the way next
git config--global user.name "pcdog" git config--global user.email "[Email protected]"
CD D:
mkdir git
Create a Directory
Initialization
Git init
The database is generated in the. git directory.
I generate the current date 1.txt and commit to Git
Date>1.txt
Git 1.txt
New files found under scan
Add a comment and submit
The file time in the warehouse is 17:56
Files in file time is 17:56
Submit History
Restore the latest 17:56 commit record
File reverts to the status of the last commit 17:54
Use git Add. All files can be added
or join a directory
Look at the state
git status
You can see which files have changed.
Git diff
See only one file
git diff 1.txt
git checkout 1.txt fast rollback
Git log looks at history, but it's more convenient to have a git UI.
Git log-1-P
See what's been changed recently
Add Branch
Git branch version1.0
Switch branches
git checkout version1.0
Code Merge
git checkout master git merge version1.0
Delete Branch
Git branch-d version1.0
The local warehouse is basically playing.
Application of Git under Windows (i)-Local warehouse code management