Top/App/jj

目次

jj

使い方

コマンドラインオプション

jj コマンドgit 相当コマンド説明・備考
jj initgit init新しいリポジトリを作成(jjはデフォルトでGitバックエンド)
jj git clone <url>git clone <url>Gitリポジトリをクローンし、jjで初期化
jj statusgit status作業中の変更を表示(jjでは自動スナップショット済み)
jj loggit logコミット履歴を表示(jjの方がデフォルトでツリー表示がきれい)
jj diffgit diff変更差分を表示
(不要)git add <file>jjでは作業中の変更が自動でコミットされる
jj describe -m "msg" または jj new -m "msg"git commit -m "msg"コミットメッセージを設定(describeで既存変更、newで新しいコミット作成)
jj describe -m "new msg"git commit --amend現在のコミットのメッセージを編集(自動で子孫をリベース)
jj checkout <bookmark> または jj new <bookmark>git checkout <branch>bookmark(Gitのbranch相当)に切り替えまたは新しい変更を作成
jj new -m "msg" <bookmark>git switch -c <branch>新しいbookmarkを作成して切り替え
jj bookmark create <name>git branch <name>新しいbookmark(branch)を作成
jj bookmark delete <name>git branch -d <name>bookmarkを削除
jj bookmark listgit branch -lbookmark一覧
jj mergegit merge <branch>現在のbookmarkにマージ(自動でマージコミット作成)
jj rebase -d <bookmark>git rebase <branch>変更を指定のbookmark上にリベース(子孫も自動リベース)
jj rebase -igit rebase -iインタラクティブにリベース
(不要)git rebase --continuejjは競合をコミット内に記録するため、rebaseが中断しない
jj new -m "stash"git stash一時的に変更をスタッシュ(新しい変更として保存)
jj squash -r <stash>git stash popスタッシュを適用(squashで親に統合)
jj restore -r <commit>git reset --hard <commit>指定コミットの状態にリセット
jj squash -r <commit>git reset --soft <commit>変更を親に統合(soft reset相当)
jj move --from <commit> --to @git cherry-pick <commit>指定コミットの変更を現在の作業中に移動
jj git fetch && jj rebase -d main@origingit pullfetch + rebase(pull相当)
jj git fetchgit fetchリモートから取得
jj git pushgit pushリモートにpush(--allで全bookmarkなど)
jj show <commit>git show <commit>指定コミットの詳細を表示
jj file annotate <file>git blame <file>ファイルの変更履歴を表示
jj new -r <commit> -m "revert" または jj op revertgit revert <commit>コミットを元に戻す(revert)

入手


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS