本文へ移動
cccskills
無料GitHub で公開日本語紹介

Jujutsu (jj) usage

CarbonリポジトリでJujutsu(jj)を使い、変更の確認やコミット、リモートとの同期、変更スタックの管理を行うための基本操作を案内します。

原文原文の説明を見る

Instructions for using Jujutsu (jj) for version control in the Carbon repository.

carbon-language/carbon-langスター 33,929(GitHub 33,929 + cccskills 0)

実行スコア 未検証

インストール方法を見る

こんなときに便利

  • jjで状態や履歴を確認したいとき
  • リモートから変更を取得したいとき
  • 変更スタックの基点を調べたいとき
  • 変更をコミット・整理したいとき

日本語での紹介

できること

CarbonリポジトリでJujutsu(jj)を使う際の基本操作を確認できます。リモートからの取得、trunk上での作業開始、状態や履歴、差分の確認、変更のコミットなどを扱います。複数の変更を積み重ねてプルリクエストにする場合は、ブックマークからスタックの基点を見つけ、対象範囲を絞って操作する方法も説明します。作業中の変更を既存の変更にまとめる操作や、変更説明の付け方も案内されています。

こんなときに便利

Carbonの作業環境がJujutsuを使っているときに、日常的なバージョン管理の操作を確認できます。変更がどのブックマークを基点としているか判断したい場合や、レビュー中の変更を含むスタックを扱う場合にも役立ちます。履歴を書き換える操作の前に、影響を確認するための指針も含まれます。

使い方の例

  • 「jjでリモートの変更を取得して、trunk上に新しい変更を作ってください」
  • 「この作業中の変更の差分と履歴を確認してください」
  • 「変更スタックの基点を特定し、対象範囲を表示してください」

注意点

リポジトリのルートに.jjディレクトリがある場合はjjを使い、ない場合は使いません。コマンドには--no-pagerを付けます。プルリクエストに提出済みの変更の履歴を書き換えてはいけません。その他の既存変更を squash、rebase、abandon、describeする場合は、実行するコマンドを提示して確認を待つよう定めています。

この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。

資料チェック

SKILL.md の記述から、注意が要る操作と導入の前提を AI が確認しました。点数は実際に動かした結果(実行検証)だけで付けています。

安全面送信・削除・コマンド実行などの扱いが明示されているか
A良好PR提出済みの履歴変更を禁じ、他の変更操作は確認を求めます。
導入のしやすさ必要なツールや API キーが少ないか、書かれているか
B一部不足`.jj`の有無で利用可否を判定しますが、jjの導入手順はありません。

点数には入れていません。 2026年10月26日 時点で AI(OpenAI Codex)が判定しました。目安なので、入れる前に原文も確認してください。

評価が違うと思ったら、見直しを依頼する

どの項目が、なぜ違うと思うかを書いてください。ログインは不要です。内容を SKILL.md と照らし合わせて評価を作り直し、この欄に反映します。

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

含まれるファイル(1)

  • SKILL.md3.9 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Jujutsu (jj) usage

<!-- Part of the Carbon Language project, under the Apache License v2.0 with LLVM Exceptions. See /LICENSE for license information. SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -->

Jujutsu is a Git-compatible version control system that may be used in Carbon checkouts.

[!IMPORTANT] You can detect if Jujutsu is in use by checking for a .jj directory in the repository root. If present, you must use jj and must not use git. If absent, you must not use jj.

General usage

Always use the --no-pager flag when invoking jj to prevent the command from blocking or waiting for terminal paging.

Common commands

Syncing with remote

  • Fetch from remote: jj --no-pager git fetch
  • Create a new change on top of trunk: jj --no-pager new trunk
  • Show repository status: jj --no-pager status
  • Show commit history: jj --no-pager log

Managing changes

  • View diff of current changes: jj --no-pager diff
  • Commit changes: jj --no-pager commit
    • Note: Prefer using jj commit over the combination of jj describe and jj new.
  • Abandon/discard current changes: jj --no-pager abandon
  • Rebase current change onto trunk: jj --no-pager rebase -o trunk

Working with a stack of changes

A change is often built as a stack of commits sent up as a single pull request. The stack is not necessarily based on trunk; it may be based on another change that is itself still in flight.

[!WARNING] Never rewrite the history of a change that has been submitted as a pull request. Reviewers track a PR by its commits, and squashing, reordering, or abandoning them discards review that is already in progress. This cannot be undone from their side.

Before rewriting history in any other case, propose the exact command and wait for confirmation. This applies to squash, rebase, abandon, and describe on an existing change.

Finding the base of the stack

Bookmarks delimit the stack. List the bookmarks that are ancestors of the working copy, nearest first:

jj --no-pager log -r '::@ & bookmarks()'

Reading the result takes care, because two situations produce similar output:

  • Editing an existing change. The nearest bookmark names the change being worked on, and the bookmark below it is the base.
  • Starting a new change. The commits above the nearest bookmark have no bookmark of their own yet, so the nearest bookmark is itself the base.

trunk is only ever a base. Finding trunk nearest means new work is being built on top of it, never that trunk itself is being worked on.

The graph does not distinguish the two cases: an unbookmarked or empty commit above a bookmark may be the next commit of that change or the start of a new one. Ask which it is when it is not clear, and ask before choosing where a fix should land rather than after. Guessing wrong means squashing into a change that may already be under review.

Once the base is known, use it to scope commands to the current stack:

jj --no-pager log -r '<base-bookmark>..@'

Managing the stack

  • Fold a fix into an earlier change: jj --no-pager squash --into <change-id> [path]. Follow-up fixes and formatter reflows belong in the change that introduced the code, not in a trailing "fixes" commit, unless that change has already been submitted. Naming a path squashes only that part of the working copy, leaving unrelated work in place.
  • Descriptions: only one change in the stack needs a long description, the one used as the pull request description. Every other change gets a short one-line summary. Do not repeat the long text across the stack.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

Accessing GitHub issues

無料概要あり

コマンドラインからGitHub issueの本文やコメントを読み取り専用で確認し、URLや番号から対象リポジトリを指定する手順を案内します。

  • issueの本文とコメントを読みたいとき
  • URLからissueの内容を確認したいとき
  • 別リポジトリのissueを参照したいとき
carbon-language/carbon-lang3.4万2026年10月26日 更新

Agent tools

無料概要あり

AIアシスタントがCarbonのコードベースを扱う際に、専用ツールでファイルを閲覧・検索・編集し、一時ファイルを管理するためのルールを示します。

  • Carbonのファイルを規則に沿って検索したいとき
  • 専用ツールを使ったファイル編集を確認したいとき
  • 一時ファイルの置き場所と削除ルールを確認したいとき
carbon-language/carbon-lang3.4万2026年10月26日 更新

Bazel usage

無料概要あり

Bazeliskを使ったCarbonプロジェクトのビルド、テスト、実行、デバッグの基本手順を確認し、対象を絞った検証やASanの利用方法も把握できます。

  • Carbonのコードをビルドしたいとき
  • 変更箇所に関係するテストを実行したいとき
  • Bazelで作ったバイナリを起動したいとき
carbon-language/carbon-lang3.4万2026年10月26日 更新

Builtin functions

無料概要あり

Carbonコンパイラに組み込み関数を追加する際の登録、型シグネチャ検証、定数評価、LLVMコード生成、テスト方法を案内します。

  • 組み込み関数を登録したいとき
  • 定数評価の処理を実装したいとき
  • LLVM IRへの変換を追加したいとき
carbon-language/carbon-lang3.4万2026年10月26日 更新

Code style

無料概要あり

Carbonツールチェーンのコードを書く際に、言語ごとの整形方法やコメント、命名、ドキュメント、コミットメッセージの基準を確認できます。

  • Carbonコードの書式を整えたいとき
  • コメントやドキュメントを見直したいとき
  • コードの名前が意味に合うか確認したいとき
carbon-language/carbon-lang3.4万2026年10月26日 更新

Diagnostics

無料概要あり

Carbonコンパイラのエラーや警告を定義し、書式やソース位置のラベルを整え、テストで網羅性を確かめる方法を案内します。

  • 診断メッセージを追加したいとき
  • エラー位置にラベルを付けたいとき
  • 診断文の表記を統一したいとき
carbon-language/carbon-lang3.4万2026年10月26日 更新

carbon-language のスキルをすべて見る

このスキルの問題を報告する