TechnicalEasy Git

What makes a good commit message and branching workflow?

Asked for Frontend Developer, Backend Developer, Full-Stack Developer, Mobile Developer

Why they ask this: Your GitHub history is often the first code a Nepali recruiter or tech lead looks at.

Answer

Good commits:

  • One logical change per commit: small and focused.
  • A short summary line in the imperative mood (about 50 characters), for example Add password reset email. Add a body explaining why when it is not obvious.
  • Many teams use Conventional Commits: feat: add job filters, fix: handle empty salary, docs: update README.
  • Never commit secrets (.env), node_modules or vendor. Use .gitignore.

A simple branching workflow (GitHub flow):

  1. Keep main always deployable.
  2. Create a branch per task: feature/job-search, fix/login-redirect.
  3. Push and open a pull request, let CI run, and get a review.
  4. Merge (often with a squash), then delete the branch.

Larger teams may add a develop branch or release branches (Git Flow), but GitHub flow is enough for most projects.

Can you explain this in your own words?

Back to question bank