DEV Community

Cover image for ABC of Git Commands
aCompiler
aCompiler

Posted on

ABC of Git Commands

If you work as a developer, you probably already know about Git and Git Commands. And today, I will share straightforward & important stuff about Git Commands.

Before that one question.

Do you know the three essential things in human life?

  1. Your Health
  2. Your Financially stability
  3. And your relationship

Yes, Once you have all these basic you can achieve anything else.

And the only purpose of this article to motivate you about GIT.

Git is really easy to learn.

Anyways. Let's come back to our original topic.

In the same way if you the essential commands in Git - You can extend your learning in Git to any level.

Without any further delay, let me share the ABC of Git.

But before that -

To understand these commands you might have to cover few other commands ( especially if you are a newbie)

A - Add ( git add command)

Syntax git add

To add multiple files use a single dot . or -A option

Syntax git add . ( to add multiple files)

With the git add command, you can add new files to the staging area.

B - Branch ( git branch command)

And one of the most significant advantages of Git is its branching model.

Here is the syntax so create and delete a branch

git branch (to create a new branch)

git branch -d (to delete a local branch)

C - Commit & Checkout ( git checkout and git commit command)
If you want to switch and create a new branch, you can use the checkout command with -b option.

git branch (to create a new branch)

git checkout (to navigate between the branches)

If you really want to learn more in-depth you can view my latest blog post here, and let me know in comments your thoughts.

I have a gift - infographic with 51+ Git commands. infographic with 51+ Git commands

It will help you to jump you from Intermediate to advanced level.

Also if you are looking for a cheat sheet pdf, you can grab that from aCompiler blog.

The only purpose of this article to show you two things

  • It's not hard to learn Git
  • And to share Git cheat sheet that really helped me. Download infographics and PDF.

Do you like or dislike the ABC of Git?

If you want to connect with me you can email me or write to me here.

Either way, let me know your thoughts.

Top comments (0)