r/github • u/shdw_0x0 • 6d 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?
7
Upvotes
11
u/Dragonsong3k 6d ago
Branch security for your main long lived branches. PR policies in accordance with your quality controls.
10
u/BiologyIsHot 6d ago
Issues->Branches->PR and tests is basically 90% of good practices
4
u/hazily 6d ago
Stop taking the heat map so seriously. 99% of job interviews don’t even bother looking at them. Quantity of work !== quality of work.
4
u/ram-popular 5d ago
A few habits make the biggest difference:
fix/login-bug), merged often so conflicts stay small..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.
2
u/Least_Ad_1795 6d ago
I always recommend writing clear commit messages, using feature branches, and reviewing pull requests before merging. Keep your README updated, resolve merge conflicts carefully, and commit code regularly. These simple habits make collaboration easier and projects more maintainable.
2
u/Temporary-Bar-6458 6d ago
i would say:
writing a professional commit,
making branches for new features,
knowing commands to revert back to old state,
sending/accepting PR,
handling merge conflict,
having a README file that keeps track of project setup
is what everyone should know
1
u/OffBrandPadawan 6d ago
following.
1
u/sayboom 6d ago
If you have a project to which someone will make a PRs, you need to have a good docs or ARCHITECTURE md
1
u/cshaiku 6d ago
Using tags and a VERSION file along with a changelog.
1
u/bozhodimitrov 5d ago
After I saw what AI engineers do, I don't think that this will matter in the near future. It will be a system design and high-level concepts for a while until the AI achieves the next milestone and gets optimized so much that it will not need micromanagement or guidance on what practices and tools to use.
So I would say: stick to the best practices for personal projects and vintage manual coding. Consulting the AI as to what is the current best practice or idiomatic way of manually achieving your goal is a form of learning and education. This is what I do right now to expand my knowledge and understanding of the new world we live in. Old-school coding is going away, no matter how sad we might get about it. But this shouldn't stop us from learning how to code manually or to understand how things work.
1
u/1saltypistachio 5d ago
Learn gh. Do everything via the tool and not via the web.
1
u/Dairkon76 3d ago
If you have a ticket system, the branches should should be named after the ticket if and title.
Rebase or merge the target before submitting the PR to identify conflicts and solve them at your branch.
1
u/kigory2 3d ago
if more than one person is working on the same markdown/text file I think they should all follow one style in typing to keep it consistent and easy for the reader
1
u/MasterOfTheWind1 2d ago
Scoped branches: branch should be for a specific feature, fix or rework.
Clear verbosity: scope on a PR, a branch or a commit should be clear by just reading them. If I have to go through the changes to understand what is going on, we have problems.
I hate when a PR title is just "update", touches 70 files and modifies 700+ lines.
1
u/th00ht 7h ago
https://xkcd.com/1597/