Engineering Tools for AI

Программирование

Термины Git/GitHub

Поисковый справочник по repository, branch, commit, синхронизации, PR, конфликтам и безопасным Git-действиям.

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.