← Back to all products

Git Commands & Workflows Guide

$12

Visual guide to Git branching strategies, merge vs rebase, cherry-pick, stash, reflog, and CI/CD integration patterns.

📁 7 files🏷 v1.0.0
MarkdownJSONYAMLShellGitHub ActionsCI/CD

📄 Product Preview

Try the interactive reader and demo tools below, or get the full product with all content unlocked.

📖 Interactive Reader (Free Preview) ⚙ Try Demo Tools 📦 Download Free Sample

📁 File Structure 7 files

git-workflows-guide/ ├── LICENSE ├── README.md ├── config.example.yaml ├── docs/ │ ├── checklists/ │ │ └── pre-deployment.md │ ├── overview.md │ └── patterns/ │ └── pattern-01-standard.md └── templates/ └── config.yaml

📖 Documentation Preview README excerpt

Git Commands & Workflows Guide

Version: 2.0.0 | Price: $12 | Format: Markdown + HTML + config examples

Overview

A practical guide to Git commands and branching workflows for professional development teams. Covers everything from daily Git operations to advanced techniques (cherry-pick, stash, reflog, bisect), branching strategies (GitFlow, trunk-based, GitHub Flow), merge vs rebase decision-making, and CI/CD integration patterns.

This isn't just a command list — it includes workflow diagrams, decision trees, and real-world patterns that help you choose the right approach for your team.

Who Is This For?

  • Developers who want to go beyond git add/commit/push
  • Tech leads choosing a branching strategy for their team
  • DevOps engineers integrating Git workflows with CI/CD pipelines
  • Anyone who's been burned by a bad merge or lost work

What's Inside

Cheatsheet Files (`cheatsheets/`)

FileTopics Covered
01-git-essentials.mdCore commands: init, add, commit, status, diff, log, remote, push, pull, fetch
02-branching-strategies.mdGitFlow, GitHub Flow, trunk-based development, release branching — comparison chart and decision guide
03-merge-vs-rebase.mdWhen to merge vs rebase, interactive rebase, conflict resolution, team guidelines
04-advanced-commands.mdCherry-pick, stash, reflog, bisect, worktree, subtree, blame, archive
05-git-hooks.mdClient and server hooks, pre-commit, commit-msg, pre-push, hook scripts
06-cicd-integration.mdGitHub Actions, GitLab CI, branch-based deployment, tag-based releases, monorepo patterns
07-troubleshooting.mdUndo commits, fix mistakes, recover lost work, resolve conflicts, clean up history

Example Files (`examples/`)

FileDescription
gitconfig-recommendedProduction .gitconfig with useful aliases, diff settings, and merge tools
pre-commit-hook.shPre-commit hook checking for secrets, lint, and file size
github-actions-ci.ymlGitHub Actions workflow with test, build, and deploy stages
gitlab-ci.ymlGitLab CI pipeline with stages, caching, and environment deployment

Quick Reference (`cheatsheet.html`)

A single self-contained HTML page with the most essential Git commands and workflows in a printable format.

How to Use

1. Unzip the product to any directory

2. Browse the cheatsheets/ folder — start with 01-git-essentials.md

3. Open cheatsheet.html for a printable desk reference

4. Copy files from examples/ into your projects and customize

5. Share the branching strategy comparison with your team to align on a workflow

Format Notes

  • All cheatsheets are GitHub-flavored Markdown
  • Includes ASCII diagrams for branching workflows (no external image dependencies)
  • Decision trees help you choose the right tool for each situation
  • Examples use realistic (but anonymized) repository names and URLs

Changelog

... continues with setup instructions, usage examples, and more.

📄 Code Sample .sh preview

examples/pre-commit-hook.sh#!/usr/bin/env bash # ============================================================================= # Pre-Commit Hook: Security & Quality Checks # ============================================================================= # Install: cp pre-commit-hook.sh .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit # Or: ln -s ../../examples/pre-commit-hook.sh .git/hooks/pre-commit # # This hook checks for: # 1. Hardcoded secrets and credentials # 2. Large files that shouldn't be committed # 3. Debug statements left in code # 4. Merge conflict markers # # Skip temporarily: git commit --no-verify # ============================================================================= set -euo pipefail RED='\033[0;31m' YELLOW='\033[1;33m' GREEN='\033[0;32m' NC='\033[0m' # No Color errors_found=0 echo "Running pre-commit checks..." # Get list of staged files (only added/modified, not deleted) staged_files=$(git diff --cached --name-only --diff-filter=ACM) if [[ -z "$staged_files" ]]; then echo -e "${GREEN}No staged files to check.${NC}" exit 0 fi # --------------------------------------------------------------------------- # Check 1: Secrets & Credentials # --------------------------------------------------------------------------- echo -n " Checking for secrets... "
Buy Now — $12 Back to Products