6行目: | 6行目: | ||
|- | |- | ||
|<code>git help</code> || ヘルプの表示 | |<code>git help</code> || ヘルプの表示 | ||
|- | |||
|<code>git status</code> || ステージの現状 | |||
|- | |||
|<code>git log</code> || 最近のログ | |||
|- | |||
|<code>git last</code> || 直近のログ | |||
|- | |||
|<code>git add</code> || 変更をステージ(マーク) | |||
|- | |||
|<code>git commit -m "Comment"</code> || 変更のコミット | |||
|- | |||
|<code>git commit -a -m "Comment"</code> || 変更を一気にコミット | |||
|- | |||
|<code>git branch</code> || ブランチの現状 | |||
|- | |||
|<code>git branch --no-merged</code> || マージされていないブランチ | |||
|- | |||
|<code>git branch hoge</code> || ブランチの作成 | |||
|- | |||
|<code>git checkout hoge</code> || hogeブランチへ切り替え | |||
|- | |||
|<code>git checkout -b fuga</code> || fugaブランチを作成し切り替え | |||
|- | |||
|<code>git log --oneline --decorate --graph --all</code> || マージの歴史 | |||
|} | |} |
2019年7月7日 (日) 09:33時点における版
よく使う操作
コマンド | 説明 |
---|---|
git config --list |
設定オプションを表示 |
git help |
ヘルプの表示 |
git status |
ステージの現状 |
git log |
最近のログ |
git last |
直近のログ |
git add |
変更をステージ(マーク) |
git commit -m "Comment" |
変更のコミット |
git commit -a -m "Comment" |
変更を一気にコミット |
git branch |
ブランチの現状 |
git branch --no-merged |
マージされていないブランチ |
git branch hoge |
ブランチの作成 |
git checkout hoge |
hogeブランチへ切り替え |
git checkout -b fuga |
fugaブランチを作成し切り替え |
git log --oneline --decorate --graph --all |
マージの歴史 |