实战演练
git config --global user.name "wuxinwudai"
git config --global user.email "1101202419@qq.com"
git config --global credential.helper store
git config --global color.ui true
git config --unset --global user.name #重置用户名配置
mkdir git_test # 创建文件夹
cd git_test # 进入文件夹
git init # 初始化 git 仓库
echo 'Hello Git' > hello_git.txt # 创建一个文件 hello_git
git add * # 添加所有文件进入缓冲区
git add -u
git status # 查看状态
git chechout -- . # 撤销所有未提交本地的文件的修改
git checkout -- filename # 撤销单个文件的修改
git commit -m 'first commit' --author="wuxinwudai<1101202419@qq.com>" # 提交到本地分支
git push origin master # 推送到远程分支
git log # 查看日志
git show xxxx121129abw23
git cat-file xxxx121129abw23
git ls-files --stage
git diff xxxxxxversion1 xxxxxxxversion2
echo 'git rm test' > tmp.txt
git add tmp.txt
git ls-files --stage
git rm -- cached tmp.txt
git ls-files --stage
git add tmp.txt
git mv tmp.txt temp.txt
git remote add origin http://xxx.xx.xx/xx.git
git pull origin master --allow-unrelated-histories
git pull
git push
git merge
git show-branch
git checkout topic
git rebase master
git rm --cached win.img
git commit --amend
git rebase -i commit-id
git stash
git checkout branch