Branch
Git & GitHubA Git branch is a movable name for a commit.
refs/heads/namegit switch -c nameLEARN · FAST REFERENCE
Definitions, useful symbols, and direct links into the guide.
46 terms · concise answers, with links into the guides
A Git branch is a movable name for a commit.
refs/heads/namegit switch -c nameMake a local repository from an existing Git repository, usually with remote configuration.
Read in depth → Creating or cloning a repositoryA commit records a selected project snapshot and its place in history.
git commitparenttreeHistory connected by parent relationships.
parent edgesA change Git cannot combine automatically and needs a human to resolve.
Read in depth → Merge and conflictsHEAD identifies a commit without a selected branch reference.
git switch --detachA comparison of file content or commits, showing additions and removals.
Read in depth → Working tree, index, and commitAdvance a reference along existing ancestry.
--ff-onlyFetch updates the locally recorded view of another repository.
git fetch originPermit a forced ref update only under an expected-state condition.
git push --force-with-leaseSeparate hosted repository derived from another repository, often for contribution.
Read in depth → GitHub collaborationDistributed version-control software that records local repository history.
Read in depth → The problem of changing filesA Git object containing file content.
blobRemove untracked files within a selected scope.
git clean -nPatterns excluding matching untracked files from ordinary discovery.
.gitignore.pio/Hash identifier for a Git object; a full commit SHA identifies a specific commit.
Read in depth → Objects, hashes, and historyA Git directory snapshot object.
treeHosting and collaboration service for Git repositories, reviews, issues and Actions.
Read in depth → The problem of changing filesGitHub workflow automation defined by files in .github/workflows.
Read in depth → GitHub collaborationHEAD identifies Git's current checkout context.
HEADgit branch --show-currentGit's index records contents selected for the next snapshot.
git addgit diff --stagedGitHub work/discussion record separate from a commit or branch.
Read in depth → GitHub collaborationMerge integrates changes from another history into the current branch.
git merge branchmerge baseA common ancestor used in history integration.
git merge-base A BConventional Git remote name, set to a URL by local configuration.
git remote -vLocal remote-tracking ref recording the last fetched view of origin’s main.
origin/mainA predecessor identified by a commit.
HEAD~1Pull fetches and then integrates another branch under the chosen policy.
git pull --ff-onlyHosted proposal to review and integrate commits from one branch into another.
Read in depth → GitHub collaborationSend reachable local Git commits to a remote and update a remote ref.
Read in depth → Fetch, pull, and pushRebase replays changes onto a different base as new commits.
git rebase--continue--abortLocal log of Git reference movements that can aid recovery.
Read in depth → Reflog, stash, and cleanupGitHub distribution record commonly attached to a Git tag.
Read in depth → Tags, releases, and canonical snapshotsNamed Git connection to another repository, such as origin.
Read in depth → Remotes and remote-tracking referencesLocal ref reflecting a branch on a remote at the last fetch.
Read in depth → Remotes and remote-tracking referencesGit-managed file history, refs and working project context.
Read in depth → The problem of changing filesReset changes selected Git state according to its command form and mode.
--soft--mixed--hardGit operation replacing worktree and/or staged file content from a source.
Read in depth → Restore, reset, and revertGit operation creating a new commit that undoes a prior commit’s changes.
Read in depth → Restore, reset, and revertSet local work aside in Git-managed recorded state.
git stash pushgit stash applyGit inspection of working tree, index and branch divergence.
git statusGit name usually used as a stable label for a specific commit.
git tag -a name -m "message"File whose content/path Git already manages in the index/history.
Read in depth → Tracked, ignored, and untracked filesFile present in the working tree that Git has not yet added.
Read in depth → Tracked, ignored, and untracked filesA configured comparison/default-operation partner for a branch.
git push -u origin nameThe working tree is the editable checkout plus local file state.
git statusgit diff