development:git
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン次のリビジョン両方とも次のリビジョン | ||
development:git [2019/01/23 05:18] – hayashi | development:git [2020/07/27 14:19] – hayashi | ||
---|---|---|---|
行 1: | 行 1: | ||
====== git ====== | ====== git ====== | ||
+ | |||
+ | ===== branchコマンド ===== | ||
+ | ==== git branch ==== | ||
+ | ローカルブランチの一覧を表示 | ||
+ | ==== git branch -r ==== | ||
+ | |||
+ | |||
+ | -r、もしくは、--remotes\\ | ||
+ | リモートブランチの一覧を表示 | ||
+ | ==== git branch -a ==== | ||
+ | -a、もしくは--all\\ | ||
+ | リモートブランチを含んだブランチの一覧を表示 | ||
===== 標準出力に出力 ===== | ===== 標準出力に出力 ===== | ||
行 7: | 行 19: | ||
===== log ===== | ===== log ===== | ||
- | * oneline: 1commit 1行のみログ表示 | + | * %%--%%oneline: 1commit 1行のみログ表示 |
- | * decorate: branch名、tag名などの別名を表示 | + | * %%--%%decorate: branch名、tag名などの別名を表示 |
- | * graph: revision graphを表示 | + | * %%--%%graph: revision graphを表示 |
- | * branches: 他のbranchのlogも表示 | + | * %%--%%branches: 他のbranchのlogも表示 |
- | * tags: tagを表示 | + | * %%--%%tags: tagを表示 |
- | * remotes: remote branchなどを表示 | + | * %%--%%remotes: remote branchなどを表示 |
行 28: | 行 40: | ||
git clone --depth 1 https:// | git clone --depth 1 https:// | ||
+ | |||
+ | ===== shortlog ===== | ||
+ | |||
+ | shortlog コマンドは git log の特別なバージョンで、リリースを作成することを目的としています。\\ | ||
+ | 作成者別にコミットメッセージの最初の行を表示します。 | ||
===== 特定のフォルダのみpull ===== | ===== 特定のフォルダのみpull ===== | ||
行 42: | 行 59: | ||
# git remote set-url --push origin User@newrepos.example.net:/ | # git remote set-url --push origin User@newrepos.example.net:/ | ||
# git push --mirror | # git push --mirror | ||
+ | |||
+ | ===== ユーザ名・パスワードの設定 ===== | ||
+ | |||
+ | <file config ~/ | ||
+ | machine github.com | ||
+ | login username | ||
+ | password xxxxxxx | ||
+ | </ | ||
===== 参考 ===== | ===== 参考 ===== | ||
- | [[https:// | + | * [[https:// |
+ | * [[https:// |
development/git.txt · 最終更新: 2022/08/14 13:23 by hayashi