Engineering Tools for AI

プログラミング

Git/GitHub 作業用語

リポジトリ、ブランチ、コミット、同期、PR、競合、安全操作を理解するための用語集です。

33

基本概念

Repository

Repository

engineerdoge/math-ai-tools

意味

A project folder tracked by Git, usually mirrored on GitHub.

使い方

When you ask to inspect a project, commit work, or compare branches, the repository is the unit being handled.

engineerdoge/math-ai-tools

依頼例

Check the current repository status.

基本概念

Working tree

Working tree

git status

意味

The files currently checked out on your machine, including edits that are not committed yet.

使い方

Use it to separate committed history from the edits currently in progress.

git status

依頼例

Show what changed in the working tree.

基本概念

Staging area

Staging area

git add src/components/SiteHeader.tsx

意味

A temporary selection of changes that will be included in the next commit.

使い方

It lets you commit only the files or hunks that belong together.

注意

Staging does not save history by itself. The commit is what records it.

git add src/components/SiteHeader.tsx

依頼例

Stage only the files for the Git terms page.

基本概念

Commit

Commit

git commit -m "Add Git terms reference"

意味

A saved snapshot of selected changes in the repository history.

使い方

Commits make it possible to review, compare, deploy, or roll back changes later.

git commit -m "Add Git terms reference"

依頼例

Create a commit with a concise message.

基本概念

Diff

Diff

git diff

意味

A line-by-line view of what changed between two file states.

使い方

Diff is the quickest way to review exactly what an edit did before committing.

git diff

依頼例

Review the diff for unexpected changes.

ブランチ

Branch

Branch

qwen3.5

意味

A named line of work that can move separately from other lines of work.

使い方

Branches let you develop a feature without changing main immediately.

qwen3.5

依頼例

Tell me which branch I am currently on.

ブランチ

main branch

main branch

main

意味

The default branch that usually represents the stable or production-ready version.

使い方

Compare your working branch with main to see what changed.

main

依頼例

Compare this branch against main.

ブランチ

checkout

checkout

git switch qwen3.5

意味

Changing the working tree to another branch or commit.

使い方

Use it when you need to inspect or continue work on another branch.

注意

Uncommitted edits can block switching branches if they would be overwritten.

git switch qwen3.5

依頼例

Switch to the qwen3.5 branch after checking for uncommitted changes.

ブランチ

merge

merge

git merge main

意味

Combining changes from one branch into another branch.

使い方

Use merge to bring main updates into your feature branch or finish a feature into main.

注意

Merge can create conflicts when both branches edited the same lines differently.

git merge main

依頼例

Explain what would happen before merging main into this branch.

ブランチ

rebase

rebase

git rebase main

意味

Replaying commits from one branch on top of another base commit.

使い方

It can make history look linear before merging a feature branch.

注意

Rebase rewrites commit history, so it should be used carefully on shared branches.

git rebase main

依頼例

Do not rebase yet. First explain the risk on this branch.

同期

clone

clone

git clone https://github.com/user/project.git

意味

Making a local copy of a remote repository.

使い方

It is usually the first step when starting work on an existing GitHub project.

git clone https://github.com/user/project.git

依頼例

Clone this repository and show the available branches.

同期

remote

remote

origin git@github.com:user/project.git

意味

A named connection from the local repository to a repository hosted somewhere else.

使い方

Remote settings decide where pull and push communicate.

origin git@github.com:user/project.git

依頼例

Show the configured remotes.

同期

fetch

fetch

git fetch origin

意味

Downloading remote branch information without changing your working files.

使い方

Use fetch before comparing your branch with the latest remote state.

git fetch origin

依頼例

Fetch from origin, then compare this branch with main.

同期

pull

pull

git pull origin main

意味

Fetching remote changes and applying them to the current branch.

使い方

Use it to update your local branch with work that was pushed elsewhere.

注意

Pull can change your working branch and may cause conflicts.

git pull origin main

依頼例

Before pulling, check whether I have local uncommitted changes.

同期

push

push

git push origin qwen3.5

意味

Uploading local commits to a remote repository.

使い方

Push makes your local commits available on GitHub or another remote.

注意

Push only uploads commits, not uncommitted working tree edits.

git push origin qwen3.5

依頼例

Push the current branch after confirming the build passes.

同期

origin

origin

git push origin qwen3.5

意味

The conventional default name for the remote repository you cloned from.

使い方

Most push, pull, and fetch examples use origin as the remote name.

git push origin qwen3.5

依頼例

Check whether origin points to the expected GitHub repository.

レビュー

Pull Request

Pull Request

Open a PR from qwen3.5 into main

意味

A GitHub review page for discussing and merging branch changes.

使い方

Use a PR to review changed files, run checks, discuss comments, and merge safely.

Open a PR from qwen3.5 into main

依頼例

Summarize what should go into the PR description.

レビュー

Review

Review

Review requested changes

意味

Checking code changes for bugs, regressions, readability, and missing tests.

使い方

Review helps catch issues before merging a branch into the shared codebase.

Review requested changes

依頼例

Review this branch for bugs and missing tests.

競合

Merge conflict

Merge conflict

CONFLICT (content): Merge conflict in src/app/page.tsx

意味

A situation where Git cannot automatically combine changes from different branches.

使い方

You must choose the correct final content before the merge can continue.

注意

Do not blindly accept one side. Check the intended behavior first.

CONFLICT (content): Merge conflict in src/app/page.tsx

依頼例

Explain the conflict and propose the safest resolution.

競合

Conflict marker

Conflict marker

<<<<<<< HEAD

意味

Text markers Git inserts into a file to show conflicting versions.

使い方

Markers show which part came from your current branch and which came from the incoming branch.

注意

Conflict markers should not remain in committed code.

<<<<<<< HEAD

依頼例

Find any remaining conflict markers.

競合

Untracked file

Untracked file

?? src/lib/git-github.ts

意味

A file that exists in the folder but has not been added to Git tracking yet.

使い方

New pages and components usually appear as untracked until staged.

?? src/lib/git-github.ts

依頼例

List untracked files and tell me which ones belong to this feature.

競合

Modified file

Modified file

M src/components/SiteHeader.tsx

意味

A tracked file whose content differs from the last committed version.

使い方

It helps you see which existing files were touched by the current work.

M src/components/SiteHeader.tsx

依頼例

Show the modified files for this task.

安全操作

stash

stash

git stash push -m "before branch switch"

意味

Temporarily saving uncommitted changes so the working tree can become clean.

使い方

Use stash before switching branches when you are not ready to commit.

注意

Stashed work can be forgotten. Always name it clearly and reapply it deliberately.

git stash push -m "before branch switch"

依頼例

Stash my current edits with a clear message before switching branches.

安全操作

reset

reset

git reset --soft HEAD~1

意味

Moving branch or staging state back to another commit or state.

使い方

Soft or mixed reset can adjust a local commit before it is shared.

注意

Hard reset can discard work. Ask for an explanation before using it.

git reset --soft HEAD~1

依頼例

Explain the safest way to undo the last local commit without losing changes.

安全操作

revert

revert

git revert abc1234

意味

Creating a new commit that undoes an earlier commit.

使い方

Revert is usually safer than rewriting history after commits have been pushed.

git revert abc1234

依頼例

Revert the problematic commit without rewriting shared history.

安全操作

force push

force push

git push --force-with-lease origin qwen3.5

意味

Overwriting a remote branch with your local branch history.

使い方

It is sometimes used after rewriting local history on a private feature branch.

注意

Force push can erase other people's remote commits. Prefer force-with-lease and confirm first.

git push --force-with-lease origin qwen3.5

依頼例

Do not force push. Explain whether force-with-lease is necessary.

安全操作

.gitignore

.gitignore

.next/

意味

A file that tells Git which files or folders should not be tracked.

使い方

Use it for build output, dependencies, local environment files, and temporary files.

.next/

依頼例

Check whether build output is ignored properly.

コマンド

git status

git status

git status --short

意味

A command that shows branch, staged changes, modified files, and untracked files.

使い方

Run it before editing, committing, pulling, or switching branches.

git status --short

依頼例

Run git status and summarize only the important changes.

コマンド

git log

git log

git log --oneline -5

意味

A command for viewing commit history.

使い方

Use it to find recent commits, compare work, or identify a commit to revert.

git log --oneline -5

依頼例

Show the last five commits in a compact format.

コマンド

git add

git add

git add src/lib/git-github.ts

意味

A command that stages changes for the next commit.

使い方

Use explicit paths when you want a focused commit.

git add src/lib/git-github.ts

依頼例

Stage only the files created for this page.

コマンド

git commit

git commit

git commit -m "Add Git terms reference"

意味

A command that records staged changes into repository history.

使い方

Use a message that says what changed and why it matters.

git commit -m "Add Git terms reference"

依頼例

Commit the staged changes with a clear message.

コマンド

git pull

git pull

git pull --ff-only

意味

A command that updates the current branch from a remote branch.

使い方

The --ff-only option avoids creating an unexpected merge commit.

git pull --ff-only

依頼例

Pull with ff-only if it is safe.

コマンド

git push

git push

git push origin HEAD

意味

A command that uploads local commits to a remote branch.

使い方

Use it after tests pass and commits are ready to share.

git push origin HEAD

依頼例

Push this branch after confirming there are no lint or build failures.