git コマンド集
- 公開日:
- 更新日:
- 文字数:483文字
| 変更履歴を表示 | git log |
|---|---|
| 1行で表示したい | git log --oneline |
| リベース | git rebase branch_name | ブランチ名の変更 | git branch -m <新しいブランチ名> |
| ブランチの削除 | git branch -d branch_name |
| commitの統合 | git rebase -i commit_id |
| commitの統合2 | pick -> s |
| commitメッセージを変更 |
(s)reword、もしくはedit git commit --amend -m "編集名" |
| rebaseを中断します。 gitのリポジトリはgit rebaseを実行する前に戻ります。 |
git rebase --abort |
| 2つ前のコミットまでなら | git rebase HEAD~2 |
| 次のrebaseした際のコミットにいきます。 | git rebase --continue |
| rebase -i を使ってpush時エラーになってどうしようもできなくなった最終手段 強制push | git push -f |
