Script Valley
Building Your Developer Portfolio
Standing Out: GitHub Profile and Online PresenceLesson 6.2

How to keep a clean and consistent GitHub commit history

conventional commits, commit message format, atomic commits, amend last commit, squash commits, branch naming, meaningful commit frequency, .gitignore hygiene

Commit History Is a Work Sample

Recruiters and developers reviewing your projects will look at your commit history. A history of "fix stuff" and "more changes" tells them you do not think about code communication.

Conventional Commits Format

# Format: type(scope): short description

feat(nav): add mobile hamburger menu toggle
fix(hero): correct CTA button alignment on 375px viewport
style(projects): convert PNG images to WebP format
refactor(contact): extract form validation to separate function
docs(readme): add environment variables table
chore(deps): update Formspree fetch endpoint URL

Rules for Good Commit Hygiene

# Fix the last commit message before pushing
git commit --amend -m "feat(hero): add clamp() fluid typography"

# Combine 3 small fix commits into one before merging
git rebase -i HEAD~3
# Mark 2 commits as 'squash' in the editor

Commit one logical change at a time. If your commit message needs the word "and" โ€” "fixed nav and updated styles and changed font" โ€” it should be three commits. Every commit in your portfolio projects should be readable by a stranger and make sense without context. This is the professional standard, and it is an easy way to stand out from portfolios where every commit says "updated files."

Up next

How to optimize your LinkedIn profile as a developer

Sign in to track progress

How to keep a clean and consistent GitHub commit history โ€” Standing Out: GitHub Profile and Online Presence โ€” Building Your Developer Portfolio โ€” Script Valley โ€” Script Valley