Article directory
Git Bash (command line) manual
illustrate
This manual only introduces basic Git commands.
In actual development, the Git plug-in in the IDE is generally used to directly complete the version management function.
Visual version control is recommended VSCode
for management. Please refer to:
"Git - VSCode User Manual"
Clone repository
Select the directory where the warehouse is downloaded
Select the directory where the repository is downloaded. for example:
E:\test
Inside this directory, 右键
select Git Bash Here
, to open the Git Bash command line.
clone command
git clone 仓库地址
for example:
git clone http://127.0.0.1:8080/songguanxun/HelloWorld.git
Get warehouse address
The warehouse address can be obtained from the Git server warehouse. Use HTTP
type address (default).
command effect
Warehouse folder display
The warehouse is downloaded to the local
check status
git status
Pull
Pull the latest version from the remote repository
git pull
Add file to cache
Add the specified file to the stage
git add <文件名>
Add all files to stage
git add .
Submit the code to the local warehouse
Submit the cache file to the local version warehouse
git commit -m "说明信息"
to push
Push to remote warehouse
push current branch
git push
Common Git commands
Please refer to: "Git Common Commands"