Git Cheatsheetのロゴ

Git Cheatsheet

組織
LobsterTrap
git-cheatsheet

Use this skill when working with git commands, version control, or repository management

概要

公開者LobsterTrap
リポジトリlola
スキル名git-cheatsheet
スター
132
フォーク
37
同梱ファイル
1
ライセンスApache-2.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 1個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    LobsterTrapがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルGit CheatsheetをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/LobsterTrap/lola/tree/main/examples/git-module/module/skills/git-cheatsheet
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/LobsterTrap/lola.git /tmp/lola
mkdir -p .claude/skills
cp -r /tmp/lola/examples/git-module/module/skills/git-cheatsheet .claude/skills/git-cheatsheet
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでGit Cheatsheetを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にGit Cheatsheetを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Git Cheatsheetは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Git Cheatsheet

Getting Started

Start a new repo:

git init

Clone an existing repo:

git clone <url>

Prepare to Commit

Add untracked file or unstaged changes:

git add <file>

Add all untracked files and unstaged changes:

git add .

Choose which parts of a file to stage:

git add -p

Move file:

git mv <old> <new>

Delete file:

git rm <file>

Tell Git to forget about a file without deleting it:

git rm --cached <file>

Unstage one file:

git reset <file>

Unstage everything:

git reset

Check what you added:

git status

Make Commits

Make a commit (and open text editor to write message):

git commit

Make a commit:

git commit -m 'message'

Commit all unstaged changes:

git commit -am 'message'

Move Between Branches

Switch branches:

git switch <name> OR git checkout <name>

Create a branch:

git switch -c <name> OR git checkout -b <name>

List branches:

git branch

List branches by most recently committed to:

git branch --sort=-committerdate

Delete a branch:

git branch -d <name>

Force delete a branch:

git branch -D <name>

Diff Staged/Unstaged Changes

Diff all staged and unstaged changes:

git diff HEAD

Diff just staged changes:

git diff --staged

Diff just unstaged changes:

git diff

Diff Commits

Show diff between a commit and its parent:

git show <commit>

Diff two commits:

git diff <commit> <commit>

Diff one file since a commit:

git diff <commit> <file>

Show a summary of a diff:

git diff <commit> --stat git show <commit> --stat

Ways to refer to a commit

Every time we say <commit>, you can use any of these:

a branch

main

a tag

v0.1

a commit ID

3e887ab

a remote branch

origin/main

current commit

HEAD

3 commits ago

HEAD^^^ or HEAD~3

Discard Your Changes

Delete unstaged changes to one file:

git restore <file> OR git checkout <file>

Delete all staged and unstaged changes to one file:

git restore --staged --worktree <file> OR git checkout HEAD <file>

Delete all staged and unstaged changes:

git reset --hard

Delete untracked files:

git clean

'Stash' all staged and unstaged changes:

git stash

Edit History

"Undo" the most recent commit (keep your working directory the same):

git reset HEAD^

Squash the last 5 commits into one:

git rebase -i HEAD~6

Then change "pick" to "fixup" for any commit you want to combine with the previous one

Undo a failed rebase:

git reflog BRANCHNAME

Then manually find the right commit ID in the reflog, then run:

git reset --hard <commit>

Change a commit message (or add a file you forgot):

git commit --amend

Code Archaeology

Look at a branch's history:

git log main git log --graph main git log --oneline

Show every commit that modified a file:

git log <file>

Show every commit that modified a file, including before it was renamed:

git log --follow <file>

Find every commit that added or removed some text:

git log -G banana

Show who last changed each line of a file:

git blame <file>

Combine Diverged Branches

Combine with rebase:

git switch banana git rebase main

Combine with merge:

git switch main git merge banana

Combine with squash merge:

git switch main git merge --squash banana git commit

Bring a branch up to date with another branch (aka "fast-forward merge"):

git switch main git merge banana

Copy one commit onto the current branch:

git cherry-pick <commit>

Restore an Old File

Get the version of a file from another commit:

git checkout <commit> <file> OR git restore <file> --source <commit>

Add a Remote

git remote add <name> <url>

Push Your Changes

Push the main branch to the remote origin:

git push origin main

Push the current branch to its remote "tracking branch":

git push

Push a branch that you've never pushed before:

git push -u origin <name>

Force push:

git push --force-with-lease

Push tags:

git push --tags

Pull Changes

Fetch changes (but don't change any of your local branches):

git fetch origin main

Fetch changes and then rebase your current branch:

git pull --rebase

Fetch changes and then merge them into your current branch:

git pull origin main OR git pull

Configure Git

Set a config option:

git config user.name 'Your Name'

Set option globally:

git config --global ...

Add an alias:

git config alias.st status

See all possible config options:

man git-config

Important Files

Local git config:

.git/config

Global git config:

~/.gitconfig

List of files to ignore:

.gitignore

Additional Resources

For detailed information about Git hooks (client-side and server-side), see git-hooks.md.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Git Cheatsheet」では何ができますか?

Use this skill when working with git commands, version control, or repository management

TypingMindでGit Cheatsheetを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Git Cheatsheetはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにGit Cheatsheetをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/LobsterTrap/lola/tree/main/examples/git-module/module/skills/git-cheatsheetを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Git Cheatsheetを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Git Cheatsheetは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもGit Cheatsheetを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Git Cheatsheet」は無料ですか?

はい。LobsterTrapがGitHubでApache-2.0ライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇