git tips & tricks

9 Useful Git Commands for programmers

Jason Zhang
5 min readMay 29, 2022

There is no doubt that Git became the most popular and best version control system available. As a programmer, you use it almost every day.

In this article, I will share my favorite 9 useful git commands with you, based on my programming experiences. This article is not a Git manual or guide, and most of the basic Git commands, such as git init, git add … , can be done through your IDEs like VS Code, and JetBrains. These commands totally based on practical scenarios, and these are the commands I use frequently.

I will demonstrate these commands using VS Code and built-in Terminal.

1. Rename a File

2. The correct way to delete files in Git

3. Modify the message of the latest commit