Article Directory
1. Download the git desktop software
Method 1 Download from the official website address
Click to jump to the download link: http://www.git-scm.com/download/win
Personally feel that this method is too slow, it is recommended to download from Taobao mirror faster and more convenient
Method 2 Download from Taobao mirror (recommended)
For details, please see this article: https://wangjiabin.blog.csdn.net/article/details/99686507
2. Use of git
2.1. Work area
2.2.git settings
git config --global user.name '这里填github使用用户名' # 设置用户名
git config --global user.email'这里填github使用的邮箱' # 设置邮箱
git config --list # 查看设置
2.3. Common commands
touch 文件名 # 创建一个文件
git add 文件名 # 添加文件
git status # 查看文件状态
git commit -m "描述" # 提交描述
2.4. Initialize a new git repository
2.4.1. Create a folder or user command line
2.4.2. Initialize the project seed
pwd # 查看当前所在目录
cd 目录 # 进入对应的目录文件夹内
git init # 初始化仓库,生成git隐藏文件夹
2.4.3. Document submission
Note: You can directly create, modify, and delete files through the file explorer.
Note: The command is entirely for learning
2.4.4. Modify files
2.4.5. Delete files
2.5. Submit the local warehouse to the remote warehouse
git push # 将本地仓库提交至远程仓库
2.6. Clone the remote warehouse to the local
git clone url # 通过远程仓库地址url克隆至本地
2.7. Synchronization failure (solution)
The requested URL returned error: 403 Forbidden while accessing
may be due to lack of permission, not your warehouse, etc.
Modify the config file in the git folder