DEV Community

Cover image for Git Commands
Rofiat Abdulkareem
Rofiat Abdulkareem

Posted on

1

Git Commands

Git push

The git push command is used to upload local repository content to a remote repository.

It transfers commits from your local repository to a remote repository, making your changes available to others who have access to that remote repository.

git init: Initializes a new Git repository in the current directory. It creates a .git folder that tracks your project files and their changes.

git clone : Creates a local copy of a remote repository using the specified URL. This command is useful for downloading an existing repository onto your machine.

git add : Stages changes (new, modified, or deleted files) for the next commit. You can specify individual files or use . to stage all changes.

git commit -m "": Records changes that have been staged with a descriptive message. This command takes a snapshot of the current state of the project.

What is a commit message?

A commit message is a brief text that accompanies each commit in a Git repository. It tells the reader what was done.

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay