Member-only story
MASTERING GIT
Mastering Git: Essential Commands and Workflows for Daily Use
Mastering Git is essential for efficiently version-controlling your work and collaborating effectively. In this post, we will explore 12 commonly used practical Git commands and workflows, covering the bulk of your Git needs. We will take a task-oriented approach, emphasising how to accomplish common tasks with Git. We’ll first explore commands and workflows useful for working with remote repositories, followed by commands that help keep your working directory tidy.
This post assumes you have a basic understanding of Git commands (e.g. staging, unstaging, committing, creating branch) and are familiar with working with remote repositories (e.g. cloning, pushing, pulling).
📌 Working with remote repositories
Let’s begin by looking at 6 common tasks that frequently arise when working with remote repositories:
📍 Create a copy of remote branch, make changes and push it
When working on a code change, one useful workflow is to:
- Create a local branch from an existing remote branch
- Make changes in the branch locally
- Push local changes to the upstream branch