Skip to content

Git Development Flow

A straightforward, day-to-day Git workflow to move from: Branch creation → Development → Pull request → Merge.

1. Standard Development Flow

  1. Create a new branch
    • Use clear and consistent branch names, for example:
      git switch -c feat/uvc-monitor-logic
      
  2. Work, add, and commit your changes
    • Follow Conventinal Commits to maintain clarity and consistency
      git add gpio_uvc_monitor.sv
      git commit -m "feat: add gpio_uvc monitor logic"
      
  3. Push your branch to GitHub
    git push -u origin feat/uvm-monitor-logic
    
  4. Open Pull Request (PR) in GitHub
    • GitHub usually suggests this automatically
    • Make sure the PR title is clear and follows Conventional Commits
    • Add a concise description summarizing the changes
    • Push additional commits as needed before merging
  5. Merge Pull Request
    • Wait for review and approval
    • Merge using your team's policy (Squash, Merge or Rebase)
    • Click Delete branch in GitHub after merging
  6. Clean up locally and prune stale remotes
    git switch main
    git fetch --prune origin
    git branch -D feat/uvm-monitor-logic
    
  7. Sync your local main branch
    git pull --ff-only origin main
    

2. Bring changes from main into a feature branch

When your feature branch becomes outdated, update it with the latest commits from main:

git switch feat/branch
git fetch origin main
git merge origin/main
# resolve conflicts if any, then commit

Reference Material

Git

Guidelines