You and your team party are already crushing the basics of GitHub, juggling branches, and smashing that merge button. But have you ever felt like things could be… smoother? Or as your team and projects grow in complexity, these foundational skills might feel…stretched. Or that amazing collaboration could be even more amazing?

Developing code in a team can feel like a full on campaign, as the projects goes on phases, new levels mean different ways to deal with different challenges. The party can grow and the way you collaborate changes. How to keep a smooth workflow on a evolving scenario?

Well, behold adventurers, because today we’re diving into some practical ways to polish your existing GitHub workflow and make your team’s development journey even more delightful!

Branching Out (in a Good Way!)

We all love our feature branches, right? They keep our main codebase clean and full of purpose. But have you ever felt the need to take your branching game to the next level?

  • More than just main: Depending on your team’s rhythm, exploring models like Gitflow (with its develop and release branches) or the simpler GitHub Flow (deploying directly from main or short-lived branches) can bring more structure. Try exploring those, highlight their pros and cons for your team and project. It’s like choosing the right dance steps for your team – find the one that makes you groove!
    [ Ideal antidote for unstructured workflows in a small but growing team. ]

  • Short and Sweet Always: Tiny, focused feature branches are a trusted allies. They’re easier to review, less likely to have merge conflicts, facilitate more frequent integration with the main codebase and generally just happier to work with.
    [ Ideal antidote for long-lived forgotten branches with way too many changes. ]

  • Explore Feature Flags: This is new to me but it has the potential to be a wild magic. Imagine being able to release code to a small group of users before unleashing it on everyone. Or even being able to work on new features in their own branches and merge them into the main codebase without making the incomplete or potentially unstable feature visible to users. Feature flags are like little toggles that will allow you do just that. Combine them with your branching strategy for safer and more controlled rollouts and you get a perfectly placed on/off switch for features.
    [ Ideal antidote for coupled deployment/release cycles. ]

Pull Requests: Fancy a touch of radiance?

Pull requests are where the magic of collaboration truly happens. Let’s focus on making them more effective!

  • Tell a Story: A pull request is like meeting your reviewers back at the tavern and telling them what you’ve been through on your adventure. Forget those vague “Fixes bug” descriptions, you want to tell where you went and which bug you killed. Craft pull request descriptions that explain why you made the changes, what problem they solve, and maybe even a little “how.”

  • Templates Are Formulas for Success: Having a consistent pull request template ensures everyone knows what to expect during a review. Include checklists for testing, documentation updates, or any other crucial steps. Everyone loves a helpful checklist.

  • Reviewing Like a Wizard: This is a longer topic but, to cut things short, code review isn’t just about catching bugs; it’s about sharing knowledge and improving code quality together.

    • Focus on the “Why”: Ask clarifying questions about the approach and methodology, not just the syntax.

    • Suggest Changes Directly: GitHub’s “suggested changes” feature is a lifesaver. It makes it super easy for authors to incorporate feedback directly avoiding ambiguity.

    • Automate the Boring Stuff: Tools like linters and static analysis can catch many common issues automatically. Integrate them with GitHub Actions to keep your codebase consistent and following the style guide, so you can skip the “line break here” type of comments.

GitHub Actions: An Automation NPC

Github Actions can also be a very attentive robot assistant! Take advantage of that on your repository.

  • Further Than CI/CD: Sure, automated testing and deployment are amazing, but Actions can do so much more! Think about automatically generating documentation, updating dependencies, checking for security vulnerabilities, or even sending Slack notifications when a pull request is merged. Browse the marketplace. Maybe you can make a game out of it? The possibilities are endless!

  • Small and Mighty Workflows: Elturel wasn’t built in a day! Don’t feel like you need to build huge workflows right away. Start small. Automate one repetitive task and build from there. See if it makes sense. Iterate. Every. little. bit. helps.

  • Share the Knowledge! If you create a particularly useful Action, consider sharing it within your team or even with the wider community. Sharing is caring!

Teamwork Makes the Perfect Party!

Ultimately, a great GitHub workflow is about how well your team collaborates.

  • Code Ownership: Who’s Responsible for this Dragon? Defining clear code ownership (using CODEOWNERS files) can streamline the review process by automatically assigning the right people to review changes in specific areas. It’s great to know the designated experts for different parts of your codebase.

  • Talk it Out: Sometimes, complex changes are easier to discuss in a quick call or a pair-programming session rather than just through comments on a pull request. Don’t be afraid to hop on a call. Find the time, hash things out and summarize the discussion in a comment.

  • Retrospectives: Learn From Your Encounters! Regularly reflect on your workflow as a team and have a team huddle to strategize your next move. What’s working well? What could be better? What do you dislike doing on regular basis? Use retrospectives to identify bottlenecks and experiment with new approaches. Make it periodic, consistent and structured; it keeps everyone isn the loop in the long-game.

Keep on levelling-up!

Optimizing your GitHub workflow isn’t a one-time thing; it’s an ongoing campaign. It will change according to the team and the nature of the work. Keep experimenting, keep learning, and most importantly, keep talking to your team! Find what works best for you and have fun along the way.