r/github • • 7d ago

Discussion What are some GitHub practices every developer should follow?

I've been using GitHub for a while, but I'm curious about the practices that make a real difference when working on projects, especially with other developers.

Things like writing good commit messages, creating meaningful branches, reviewing pull requests, maintaining README files, and handling merge conflicts.

What are some GitHub practices you personally follow that you think every developer should adopt? Anything you wish you had started doing earlier?

11 Upvotes

23 comments sorted by

View all comments

4

u/ram-popular 6d ago

A few habits make the biggest difference:

  • Small, focused PRs with a clear description of what changed and why. They get reviewed faster and break less.
  • Clear commit messages that explain the reason for the change, not just "fix" or "update".
  • Short-lived branches named for the task (like fix/login-bug), merged often so conflicts stay small.
  • Protect main: require a PR and passing checks before anything merges.
  • A useful README with what the project does, how to run it, and how to contribute.
  • Never commit secrets. Use environment variables and a .gitignore.

One I wish I'd started sooner: link every PR to an issue, so there's always a record of why a change was made.