Workflows

Real-world workflow examples using GitGuru for different development scenarios.

Daily Development Workflow

A typical day-to-day workflow for feature development:

bash
# 1. Start your day - sync with remote
gg sync

# 2. Create a feature branch
gg branch -c feature/user-profile

# 3. Work on your code...

# 4. Check what you've changed
gg status
gg diff --ai  # Get AI summary of changes

# 5. Stage related files
gg add

# 6. Commit with AI-generated message
gg commit --ai

# 7. Push your work
gg push

# 8. Repeat steps 3-7 as needed

Feature Branch Workflow

Complete workflow for developing a new feature:

bash
# Start a new feature
gg ask "create a branch called feature/authentication"

# Work on the feature, making commits
gg add
gg commit --ai

# Keep your branch up to date with main
gg ask "update my branch with latest changes from main"

# When feature is complete, prepare for PR
gg ask "squash last 5 commits into one"

# Push for pull request
gg push
Keeping Branches Updated
Regularly sync your feature branch with main to avoid large merge conflicts later.

Code Review Workflow

Workflow for reviewing someone else's code:

bash
# Fetch latest changes
gg fetch

# Switch to the PR branch
gg ask "switch to the branch feature/new-login"

# Understand the changes
gg log -n 10 --ai  # AI analysis of recent commits
gg diff main --ai  # AI summary of all changes vs main

# If changes look good, merge
gg ask "merge feature/new-login into main"

# Clean up
gg ask "delete branch feature/new-login"

Hotfix Workflow

Emergency fix workflow for production issues:

bash
# 1. Create hotfix branch from main
gg ask "create branch hotfix/critical-bug from main"

# 2. Make your fix

# 3. Quick commit
gg add
gg commit "fix: resolve critical authentication bug"

# 4. Push immediately
gg push

# 5. After PR is merged, clean up
gg ask "switch to main and pull"
gg ask "delete branch hotfix/critical-bug"

Morning Sync Workflow

Start your day by syncing with the team:

bash
# Quick sync with remote
gg sync

# See what changed overnight
gg log -n 20 --ai

# Check for any AI-detected patterns or concerns
gg status --ai

End of Day Workflow

Clean up before ending your work day:

bash
# Make sure everything is committed
gg status

# Push all local work
gg push

# Clean up merged branches
gg ask "delete all local branches that have been merged to main"

# Quick status check
gg status

Learning Git Interactively

Use GitGuru as a learning tool:

bash
# Learn about a concept first
gg explain rebase
gg explain "merge vs rebase"

# Then practice with guidance
gg ask "show me how to rebase my branch onto main"

# If something goes wrong, ask for help
gg ask "I'm in the middle of a rebase conflict, what do I do?"

# Learn from your history
gg log -n 10 --ai  # AI will analyze patterns in your commits

Collaborative Team Workflow

Working with a team on shared branches:

bash
# Always fetch before starting work
gg fetch

# Check if your branch is behind
gg status

# Pull with rebase to keep history clean
gg pull --rebase

# Work on your changes
gg add
gg commit --ai

# Before pushing, sync again
gg sync --rebase

# Review what you're pushing
gg push --dry-run

# Push when ready
gg push

Release Workflow

Preparing a release:

bash
# Create release branch
gg ask "create branch release/v1.2.0 from main"

# Review all changes since last release
gg ask "show all commits since tag v1.1.0"
gg log -n 50 --ai  # AI analysis of changes

# Make any final adjustments
gg add
gg commit "chore: prepare v1.2.0 release"

# Tag the release
gg ask "create tag v1.2.0 with message 'Release version 1.2.0'"

# Push with tags
gg ask "push with tags"

Repository Cleanup Workflow

Periodic repository maintenance:

bash
# Delete merged branches
gg ask "delete all local branches that have been merged"

# Clean untracked files (use with caution!)
gg ask "show untracked files"
gg ask "delete untracked files in build folder"

# Fetch and prune remote tracking branches
gg ask "fetch and prune deleted remote branches"

# Check repository status
gg status --ai
Be Careful with Cleanup
Always review what will be deleted before executing cleanup commands. Use --dry-run when available.

Next Steps