All tags
branch
Narrow down
Git27
- Tip
git show-branch main featuregit show-branch shows which commits sit on which branchShows in one table which commits are on which branch since they split.3 Dec 2026 - Tip
git merge --no-ff feature -m "Merge feature"git merge --no-ff keeps a merge commit even when Git could fast-forwardAlways creates a merge commit, so a finished feature branch stays visible as a group in the history.3 Dec 2026 - Tip
git merge --squash featuregit merge --squash turns a whole branch into one staged changeApplies all changes of a branch to your working tree without committing, so you can record them as one commit.3 Dec 2026 - Tip
git merge --abortgit merge --abort gets you out of a merge that ended in conflictsCancels a merge that stopped on conflicts and puts the branch back the way it was before.3 Dec 2026 - Tip
git branch --edit-description [<branch-name>]git branch --edit-description stores a note about what a branch is forSaves a free-text description for a branch, so you remember later what it was meant to do.3 Dec 2026 - Tip
gh issue develop 123 --checkoutgh issue develop creates a branch that GitHub links to the issueCreates a branch for an issue on GitHub, linked to the issue, and can check it out locally.3 Dec 2026 - Tip
concurrency:concurrency with cancel-in-progress stops older workflow runs when you push againMakes a GitHub Actions workflow cancel its older run on the same branch when a new one starts.3 Dec 2026 - Tip
git rebase --onto main feature-a feature-bgit rebase with onto moves a branch off another branch it was built onReplants only your own commits onto main when you branched from the wrong branch.30 Nov 2026 - Tip
git push origin --delete feature/logingit push origin with delete removes a branch from the serverDeletes a branch on the remote after it has been merged.30 Nov 2026 - Tip
git log --oneline main..featuregit log main..feature lists the commits that are not on main yetShows exactly which commits a merge would bring in from your branch.30 Nov 2026 - Tip
git switch feature/exportgit switch with a remote branch name creates the local branch for youChecks out a colleague's branch from the remote with one short command.30 Nov 2026 - Tip
git fetch origin main:maingit fetch origin main:main updates main without switching to itFast-forwards your local main from the server while you stay on your feature branch.30 Nov 2026 - Tip
git branch -u origin/maingit branch -u links an existing branch to a remote one, no push neededConnects an existing local branch to a remote branch without pushing anything.30 Nov 2026 - Tip
git switch --detach v1.4.0git switch with detach lets you look at an old version without a branchChecks out any tag or commit to test it, without creating or moving a branch.30 Nov 2026 - Tip
git diff main...featuregit diff with three dots shows only what your branch changedCompares your branch with the point where it left main, so other people's work stays out.30 Nov 2026 - Tip
git branch -m old-name new-namegit branch -m renames a branch, and two pushes rename it on the remoteRenames a branch locally and on the server without losing its commits.30 Nov 2026 - Tip
git log --graph --oneline --allgit log with graph, oneline and all draws your branches in the terminalDraws every branch and merge as a small text graph so you see how they relate.30 Nov 2026 - Tip
git branch -c feature feature-backupgit branch -c copies a branch together with its settingsMakes a copy of a branch that keeps its upstream and other branch config.30 Nov 2026 - Tip
git config --global init.defaultBranch mainInit.defaultBranch sets the branch name for every new git repositoryMakes git init start on main, or any name you like, without the hint every time.30 Nov 2026 - Tip
git stash branch login-form stash@{0}git stash branch turns a stash into its own branchCreates a branch at the commit where you stashed and applies the stash there.30 Nov 2026 - Tip
git merge-base main featuregit merge-base finds the commit where two branches splitPrints the common ancestor of two branches, handy for diffs, rebases and scripts.30 Nov 2026 - Tip
git rev-list --left-right --count main...HEADgit rev-list with left-right and count tells you how far ahead or behind you arePrints two numbers: commits only on one branch and commits only on the other.30 Nov 2026 - Tip
git worktree prune -n -vgit worktree prune cleans up worktrees you deleted by handRemoves leftover bookkeeping for worktree folders that no longer exist.30 Nov 2026 - Tip
git switch --orphan gh-pagesgit switch with orphan starts a branch with no historyCreates an empty branch that shares no commits with the rest of the repository.30 Nov 2026 - Tip
git branch -vvgit branch -vv shows which remote branch each local branch tracksLists local branches with the upstream branch each one tracks and the last commit.28 Nov 2026 - Tip
git switch - # back on your feature branchgit switch – takes you back to the branch you were onJumps back to the previous Git branch without typing its name.23 Oct 2026 - Tip
git branch --sort=-committerdateSort your branches by last commit with branch.sortLists your branches with the most recently committed one at the top.18 Sep 2026
Nothing matches.