git config --global user.name "your_name"
git config --global user.email "[email protected]"
git init
git clone https://github.com/your_username/your_repository.git
git add .
git commit -m "your commit message"
git status
git log
git branch branch_name 创建
git checkout branch_name 切换
git merge branch_name 合并
git branch -d branch_name 需要先合并
git remote add origin https://github.com/your_username/your_repository.git 添加远程仓库
git push -u origin branch_name 推送分支到远程仓库
git pull origin branch_name 从远程仓库拉取分支
git reset --hard commit_hash