初始化仓库

git init

添加文件

git add .

提交更改

git commit -m "Initial commit"

查看状态

git status

查看历史

git log --oneline

创建分支

git checkout -b <branch_name>

切换分支

git checkout <branch_name>

合并分支

git merge <branch_name>

推送到远程

git push origin <branch_name>

拉取更新

git pull origin <branch_name>

添加远程仓库

git remote add origin <repository_url>

查看差异

git diff