Git的精简使用。
git init
git add *
git restore --staged *
git commit -m <说明信息>
git reset --soft HEAD^
git branch <分支名>
git switch <分支名>
git switch <合并分支名>
git merge <被合并分支名>
git add *
git commit -m <说明信息>
git branch -d <被合并分支名>
git clone -o <本地对远程仓库的别名:一般为origin> <远程仓库的地址>
git fetch <远程仓库名> <远程分支名>
git merge <远程仓库名>/<远程分支名>
git add *
git restore --staged *
git commit -m <说明信息>
git reset --soft HEAD^
git push <远程仓库名> <远程分支名>
git branch <本地分支名>
git switch <本地分支名>
git fetch <远程主机名> <远程分支名>
git branch -u <远程主机名>/<远程分支名>
git branch <分支名>
git switch <分支名>
git switch <合并分支名>
git merge <被合并分支名>
git add *
git commit -m <说明信息>
git branch -d <被合并分支名>
git status #查看状态
git status -s #查看精简的状态
git branch #查看分支
git branch -vv #查看有本地分支、跟踪分支和远程分支关联信息的分支
git branch -a #查看所有的分支
git log #查看日志
git log --oneline #查看一个提交为一行格式的日志
Git的精简使用。