Common Git Commands and what they do

vincod

Odipo Otieno (KwargDevs)

Posted on January 24, 2023

Common Git Commands and what they do
  1. git init: Initializes a new Git repository.
  2. git clone: Creates a copy of a remote repository on your local machine.
  3. git add: Adds changes to the staging area, in preparation for a commit.
  4. git commit: Creates a new commit with the changes in the staging area.
  5. git status: Shows the status of the working directory, including changes that have been made but not yet committed.
  6. git log: Shows a log of all commits in the repository.
  7. git diff: Shows the differences between the working directory and the last commit.
  8. git branch: Shows a list of branches in the repository and indicates the current branch.
  9. git checkout: Allows you to switch between branches or restore files in your working directory to a specific commit.
  10. git merge: Merges changes from one branch into another.
  11. git pull: Fetches and merges changes from a remote repository into your local repository.
  12. git push: Pushes commits from your local repository to a remote repository.
💖 💪 🙅 🚩
vincod
Odipo Otieno (KwargDevs)

Posted on January 24, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Common Git Commands and what they do
beginners Common Git Commands and what they do

January 24, 2023

Getting Started with TailwindCSS
beginners Getting Started with TailwindCSS

January 23, 2022

JavaScript Bites: Closure
beginners JavaScript Bites: Closure

November 16, 2021