差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン 次のリビジョン両方とも次のリビジョン | ||
linux:git [2020/02/03 12:34] – [タグ/ブランチ] ともやん | linux:git [2021/03/24 01:49] – [参考文献] ともやん | ||
---|---|---|---|
行 19: | 行 19: | ||
* branch | * branch | ||
</ | </ | ||
+ | |||
ローカルの master を、リモート追跡の master にリセットする。\\ | ローカルの master を、リモート追跡の master にリセットする。\\ | ||
< | < | ||
$ git reset --hard origin/ | $ git reset --hard origin/ | ||
</ | </ | ||
+ | |||
+ | **Untracked files** を(-d ディレクトリを含めて)削除する。\\ | ||
+ | < | ||
+ | $ git clean -df | ||
+ | </ | ||
+ | |||
+ | **submodule** の **new commits, modified content** をリセットする。\\ | ||
+ | < | ||
+ | $ git submodule foreach --recursive git reset --hard | ||
+ | </ | ||
+ | |||
+ | **submodule** の **new commits** をリセットする。\\ | ||
+ | < | ||
+ | $ git submodule update --init | ||
+ | </ | ||
+ | |||
ローカルの状態を確認する。\\ | ローカルの状態を確認する。\\ | ||
< | < | ||
行 31: | 行 48: | ||
nothing to commit, working tree clean | nothing to commit, working tree clean | ||
</ | </ | ||
- | ===== タグ/ | + | |
+ | ===== タグ/ | ||
==== タグ ==== | ==== タグ ==== | ||
行 171: | 行 189: | ||
===== 参考文献 ===== | ===== 参考文献 ===== | ||
[[http:// | [[http:// | ||
+ | [[https:// | ||
+ | [[https:// | ||
+ | |||