git rebase -i: 合并commit log
- git rebase -i HEAD~n 合并从后向前n个 也有可能是HEAD^^ 这种,先补全查看一下
git 设置代理
# 设置
git config --global https.proxy https://10.0.32.101:3128
git config --global http.proxy http://10.0.32.101:3128
# 取消
git config --global --unset http.proxy
git config --global --unset https.proxy
列出配置文件内容
git config -l // 其他操作常看git --help
git 提交文件限制100M 处理方式
git config http.postBuffer 524288000
查看分支情况
git branch 列出本地已经存在的分支,并且当前分支会用*标记
git branch -r 查看远程版本库的分支列表
git branch -a 查看所有分支列表(包括本地和远程,remotes/开头的表示远程分支)
git branch -v 查看一个分支的最后一次提交
git branch --merged 查看哪些分支已经合并到当前分支
git branch --no-merged 查看所有未合并工作的分支
修改提交信息(修改最后一次)
git commit --amend
退回远程的提交
git log -n 查看提交日志
git reset commit-bash 本地回退
git push origin <branch-name> --force 强制推送至远端
git add .
git commit -m "提交描述"