DEV Community

Eternal Dev for Eternal Dev

Posted on • Originally published at eternaldev.com on

Git workflow explained with visual boards

Git Workflow Basics

Introduction

One of the most important skills as a web developer is learning to communicate and work properly with teams.

Git helps developers work in a more collaborative manner and so it is an essential skill for all devs

Getting and Creating Projects

Let's start by creating a new project or clone a project from a repository. Cloning the remote repository will mark the beginning of our wonderful journey of making a mess and leaving our mark in the codebase.

Getting and Creating Git Projects

Adding Remote Repository

Once we have a local repository created, we need to link it with the remote repository. If you have cloned the repo, you can skip this step

Adding Remote Repository

Staging Changes

So you spend all day breaking your head and fixing that one production bug that might show for only 1% of your user base. So what next ?

Staging the files eliminates the risk of committing unnecessary local changes. Stage only the changes which are needed.

Staging Changes

Commit to branch

Now comes an important step to write a beautiful commit message which your team members will understand about the fix for the bug in a short sentence

Commit to branch

Pushing branch to remote

Finally pushing the branch to your remote repository for your team to perform a critical peer review of your code before merging changes. Be open to feedback and update your code based on the team guidelines

Pushing branch to remote

Summary

If you have any questions or suggestions, feel free to join our discord community

Discord

Top comments (0)