Advanced Git Workflows
Advanced Git workflows are team rules and history-editing techniques for moving changes from individual branches into shared releases. They help you keep collaboration predictable while you review, integrate, backport, debug, and recover changes.
itDevOps and software delivery | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Intro
Advanced Git Workflows
Git gives you commits, branches, tags, and remotes. A workflow turns those parts into a collaboration policy.
The policy answers practical questions. Where does new work begin? When can a branch enter the shared history? Who integrates it? Which checks must pass? May you rewrite it? How do you move an urgent fix without moving unrelated work?
There is no single advanced workflow that fits every team. Git supports a centralized shared repository, an integration-manager model, and more distributed arrangements. You can also combine parts of those models. The useful choice is the smallest policy that matches your release risk, team shape, and integration frequency.
Think in commits and references
A commit records a snapshot and points to its parent commit or commits. Those parent links form a directed history. A branch is a movable reference to one commit. A tag normally names a specific point.
This model matters because most advanced operations change either the graph or a reference:
- A merge joins development histories. A true merge commit has more than one parent.
- A rebase reapplies commits on a new base. It creates new commits, even when the resulting files look the same.
- A cherry-pick applies the change introduced by an existing commit and records a new commit.
- A fast-forward moves a branch reference because the current tip is already an ancestor of the incoming tip.
Treat commit identity as immutable. If you rewrite a commit, you create a replacement with a different identity.
Continue the course
This section is part of the paid course.
See pricing to subscribe, or log in if you already have access.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell
Supports
- Commits contain parent links that form history
- A branch is a movable reference to a commit
- Git branching and merging are lightweight workflow mechanisms
- https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging
Supports
- Topic and hotfix branch workflow
- Three-way merge using two branch tips and their common ancestor
- Merge conflict state and resolution flow
- https://git-scm.com/book/en/v2/Git-Branching-Branching-Workflows
Supports
- Long-running branches for stability stages
- Topic branches for isolated work and review
- Local nature of branch and merge operations
- https://git-scm.com/book/en/v2/Distributed-Git-Distributed-Workflows
Supports
- Centralized workflow
- Integration-manager workflow
- Hierarchical distributed workflow
- Ability to combine workflow characteristics
- https://git-scm.com/book/en/v2/Git-Branching-Rebasing
Supports
- Merge and rebase as two ways to integrate changes
- Rebase replays committed changes on another base
- Rebase creates replacement commits
- Warning against rebasing commits that collaborators use
- https://git-scm.com/docs/git-rebase
Supports
- Rebase transplants commits to a different starting point
- Interactive rebase can reorder or combine commits
- Commit splitting and rebasing merges
- Continue, skip, abort, quit, and edit-todo controls
- Recovery concerns after an upstream branch is rewritten
- https://git-scm.com/docs/git-merge
Supports
- Merge joins development histories
- Fast-forward and non-fast-forward behavior
- Squash mode prepares the combined effect without making a merge commit
- Continue, abort, and quit controls
- Merge strategies and conflict options
- https://git-scm.com/docs/git-cherry-pick
Supports
- Cherry-pick applies changes introduced by existing commits
- A new commit is recorded for each applied change by default
- Clean working-tree requirement
- Continue, skip, abort, and quit controls
- Selective change transfer and backport example
- https://git-scm.com/docs/git-rerere
Supports
- Rerere reuses recorded conflict resolutions
- Repeated-conflict use case for long-lived topic branches
- Status, diff, forget, clear, and garbage-collection operations
- https://git-scm.com/docs/git-worktree
Supports
- One repository can have a main working tree and linked working trees
- More than one branch can be checked out at the same time
- Add, list, lock, move, prune, remove, repair, and unlock operations
- https://git-scm.com/docs/git-bisect
Supports
- Binary search between known endpoints
- Good and bad or old and new classification
- Automated classification with bisect run
- Reset after a bisect session
- https://git-scm.com/book/en/v2/Git-Branching-Branch-Management
Supports
- Merged and unmerged branch filters
- Safe branch deletion checks
- Local and remote branch naming considerations
- https://git-scm.com/docs/githooks
Supports
- Client-side and server-side Git hook trigger points
- Hook installation in a repository hooks directory
- Hook exit status can allow or stop specific operations
- https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
Supports
- Client-side hooks are not copied when a repository is cloned
- Local hooks support workflow checks but do not alone enforce a policy for all clones
- https://github.com/sindresorhus/awesome
Supports
- Starting point for topic-specific awesome-list discovery
- Git add-on, Git hook, and Git workflow list categories
- https://github.com/dictcp/awesome-git
Supports
- Discovery of pre-commit, Lefthook, Tig, and git-absorb
- Curated Git workflow, hook-management, tools, and extension categories
- https://pre-commit.com/
Supports
- Multi-language Git hook management
- Project configuration and hook environment installation
- Local and continuous-integration execution
- https://lefthook.dev/
Supports
- Project-configured Git hook management
- Parallel hook jobs and file selection
- Hook installation into the repository
- https://jonas.github.io/tig/doc/manual.html
Supports
- Terminal interface for browsing Git repository changes
- Commit range, reference, diff, and log inspection
- Pager mode for Git command output
- https://github.com/tummychow/git-absorb
Supports
- Automatic assignment of staged changes to fixup commits
- Optional autosquash integration
- Safety behavior for changes that cannot be assigned
- Recovery through the pre-absorption reference
