git
差别
这里会显示出您选择的修订版和当前版本之间的差别。
| 两侧同时换到之前的修订记录前一修订版后一修订版 | 前一修订版 | ||
| git [2020/09/01 14:24] – plough | git [2022/04/20 17:29] (当前版本) – plough | ||
|---|---|---|---|
| 行 24: | 行 24: | ||
| # 列出所有子模块 | # 列出所有子模块 | ||
| git submodule | git submodule | ||
| + | </ | ||
| + | |||
| + | ===== 压缩commit ===== | ||
| + | [[https:// | ||
| + | < | ||
| + | git rebase -i HEAD~4 | ||
| + | </ | ||
| + | |||
| + | ===== 修改用户名和邮箱 ===== | ||
| + | [[https:// | ||
| + | < | ||
| + | // 设置全局 | ||
| + | git config --global user.name " | ||
| + | git config --global user.email " | ||
| + | |||
| + | // 或者设置本地项目库配置 | ||
| + | git config user.name " | ||
| + | git config user.email " | ||
| + | |||
| + | // 修改最近一次提交的用户信息 | ||
| + | git commit --amend --author=" | ||
| + | </ | ||
| + | |||
| + | ===== 回退到某个版本 ===== | ||
| + | < | ||
| + | git reset --hard fae6966548e3ae76cfa7f38a461c438cf75ba965 | ||
| + | </ | ||
| + | |||
| + | ===== 本次提交跳过 precommit 检查 ===== | ||
| + | < | ||
| + | git commit --no-verify -m " | ||
| </ | </ | ||
git.1598941497.txt.gz · 最后更改: 2020/09/01 14:24 由 plough