git commit -m “” : 提交并注释git
git status : 查看仓库状态日志
git log : 命令显示从最近到最远的提交日志(–pretty=oneline参数)同步
git reset : 版本回退it
HEAD指向的版本就是当前版本,所以,Git容许咱们在版本的历史之间穿梭,使用命令git reset –hard commit_id。
穿梭前,用git log能够查看提交历史,以便肯定要回退到哪一个版本。
要重返将来,用git reflog查看命令历史,以便肯定要回到将来的哪一个版本。注释
分支:
git log –graph命令能够看到分支合并图co
pull:本地 <– 远程
push:本地 –> 远程远程
本质上都是同步commitpush
若是你本地落后远程,必然要pull
若是你本地超前远程,必然要push版本