Git Development Flow
A straightforward, day-to-day Git workflow to move from: Branch creation → Development → Pull request → Merge.
1. Standard Development Flow
- Create a new branch
- Use clear and consistent branch names, for example:
- Work, add, and commit your changes
- Follow Conventinal Commits to maintain clarity and consistency
- Push your branch to GitHub
- 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
- 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
- Clean up locally and prune stale remotes
- Sync your local
mainbranch
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