Faster Git Workflow With Git Aliases

Faster Git Workflow With Git Aliases

Git is an intricate part of our development workflow. There are handful of commands that you keep repeating day in and day out. I always relied on the command suggestions, or packages on top of my shell that gave access to handy git aliases.

Git is an intricate part of our development workflow. There are handful of commands that you keep repeating day in and day out. I always relied on the command suggestions, or packages on top of my shell that gave access to handy git aliases.

But usually you had to stick with the aliases decided by the package creators . Although most of the aliases included are unofficially globally accepted like ga for git add and so on.

But guess what? You don’t have to rely on any third party packages ; you can create your own with the aliases you prefer!

There are two ways of creating Git aliases: ✌

with the git config utility 💻

This is the preferred way of adding aliases as git gives you an option to do so. Suppose you feel tired of repeating the commit command every now and then. It would be nice if we could create an alias to write our commits faster.

The above command follows the following syntax:

Now we can use the c alias to represent commit -m .

git c "Update readme with social links"

editing the .gitconfig file 📝

It would be tedious to add multiple aliases with the git config command, so there's an easier alternate approach.

All the alias you create is saved to the .gitconfig file sitting in your home directory. We can open the file and add our aliases following the TOML formatting. Make sure you do not modify anything in the file apart from adding the [alias] table and its contents.

Open the file using your favorite editor.

vim ~/.gitconfig ## or code ~/.gitconfig

Start adding your alias ✍️

You can use the above aliases as follows:

git st ## git status 
git c "hello world" ## git commit -m "hello world" 
git a hallucination.py ## git add hallucination.py 
git cb multi-stage-build ## git checkout -b multi-stage-build

command-line git github productivity programming

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Basic Git Commands you need to Master

All basic commands you need to know to run git .Basic Git Commands you need to Master

Navigating Git and Github: Part I

We will cover what is Git & Github; we will learn command line interface; we will write Python; we will successfully push a Git repository. Navigating Git and Github. In this blog, we will go over a common problem of working on digital work, collaboratively in a real work environment. We will give a brief description of Git and Github, and how they interact with one another. We will go through some command line interface within the Mac terminal. We will also write a little Python through an IDE/text editor. Finally, we will go about setting up Git with a Mac-UNIX environment and how to successfully implement version control using Github.

Git vs. GitHub | What is Git and GitHub?

Naz talks about the differences and similarities between Git and Github. A very common question amongst the programming community. Let's settle this once and for all.

Git and GitHub Tutorial || Git Architecture || Git Crash Course || Professional Git

Git and GitHub Tutorial || Git Architecture || Git Crash Course || Professional Git (Things no one taught). This is a git tutorial for beginners/ github tutorial using git bash only. Hence it will enhance the knowledge of git commands as we will do all the operation used in git using git bash and git command manually. There are many GUIs available but using commands will be the best way to learn git.

Git — Most frequently used commands

Git: Version control system to track changes in your projects. It is also used to push and pull changes from remote repositories like GitHub, GitLab, BitBucket, etc.