Git Operations
文章目录
Git Operations
How to remove local untracked files from the current Git branch To remove directories, run git clean -f -d or git clean -fd.
To remove ignored files, run git clean -f -X or git clean -fX.
To remove ignored and non-ignored files, run git clean -f -x or git clean -fx.reset to an absolute commit SHA1 value
|
|
- Git submodule
|
|
- Change branch name
|
|
|
|
Squash my last X commits together using Git
Usegit rebase -i <after-this-commit>
and replace “pick” on the second and subsequent commits with “squash” or “fixup”, as described in the manual.How to modify existing, unpushed commit messages? Amending the most recent commit message
|
|
Changing the message of a commit that you’ve already pushed to your remote branch If you’ve already pushed your commit up to your remote branch, then - after amending your commit locally (as described above) - you’ll also need to force push the commit with:
|
|
|
|
文章作者 Hustbill
上次更新 2015-06-26