My GitHub Workflow for Improved Productivity

I like to follow systems in my work that will prioritize collaboration and project organization. With GitHub, this means making the most of well-defined branches, issues, project boards, and pull requests.

Branches

Next, I will create a new branch called develop that will be used for current development. This branch will carry my most up to date completed changes. During active development, develop branch will generally have code that is not yet deployed to production.

For specific features that will be implemented, I will create feature branches. Feature branches will have names specific to the item at hand and they will be worked on independently of other development. This allows developers to collaborate on various features and make targeted pull requests.

Branch Workflow

Feature branches can be removed once work on them is completed and their changes have been merged. I will usually remove a feature branch once its changes are merged into the main branch, which should happen when develop is merged into main with my workflow. If you are wary of deleting branches, you can also keep track of the commit history by creating a tag.

Issues

The GitHub issues allow for greater organization and increased collaboration with developers. Issue descriptions also allow you to upload photos to give more context, which is very useful when it comes to reproducing bugs or making design decisions. Moreover, their integration into project boards make project management much easier to tackle.

Project Boards

Pull Requests

Putting It All Together

Steps

GitHub repository name

2. I created a develop branch off of the main branch.

Branches

3. I created a project board with the automated kanban flow template to track issues.

Automated kanban template setting

4. I defined issues for tasks to be completed for the project and made sure to link them to the project board.

5. I moved the issue I was working on to the In progress column in my kanban board.

Project board with issues added

6. I created a feature branch off of the main branch, since the main branch should be the source of code that is always deploy-able.

Feature branch created

7. I implemented the feature that my branch was focused on by committing my changes.

8. I made a pull request from my feature branch to develop branch.

PR from feature branch to develop branch

9. Once the PR was reviewed and the code was tested, the PR is merged into the develop branch.

PR merged into develop

10. Assuming these are all the changes we expect for the next release, I will make a PR from develop into the main branch making sure to link the issues that I want closed upon merging (using “Closes #1” in this example).

PR from develop branch into main branch

11. I will confirm that develop is deploy-able by deploying from develop and checking for success.

12. Once develop is deemed deploy-able and the PR is approved, we merge develop into the main branch. This completes the life cycle of any feature implementations we had created. We will see both the issue and PR closed and moved to Done in the automated project board.

PR and issue are closed and automatically moved to Done in the project board

13. Optionally clean up feature branches that were merged by deleting them and consider tagging the commit history if you would like to keep a reference.

14. Repeat steps 5 through 13 indefinitely.

This may seem like a lot of steps, but systems like this will become natural over time! As I become more experienced, my workflow is subject to change; however, following the system above has proven to greatly increase the productivity of my team and I. For practicality, you should adjust your workflow to meet the specific needs of your team and project. I hope you learned something from my GitHub workflow that will help you develop software more efficiently!

Originally published at https://www.abeyep.com.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abraham Yepremian

Software Engineer / Tech Entrepreneur with interests in full stack development, web3 technology, software scalability, fitness, and finance — abeyep.com