Learn Git in One Minute

Mr.Javed Multani
3 min readJun 10, 2023

๐ŸŽฏ ๐—š๐—ถ๐˜ ๐—–๐—ผ๐—บ๐—บ๐—ฎ๐—ป๐—ฑ๐˜€ ๐—ฌ๐—ผ๐˜‚ ๐—ฆ๐—ต๐—ผ๐˜‚๐—น๐—ฑ ๐—ž๐—ป๐—ผ๐˜„

๐Ÿ“Œ 1. git init

This command lets us create a new .repository

A hidden .git directory is added to the folder.

Most of the git commands do not work outside the initialized project, so this is the first command you will run in a project.

Go to project folder > run git init

๐Ÿ“Œ 2. git clone

This command creates a local copy of a remote repository.

When you clone a repo the source code gets automatically downloaded to the local machine.

This local repo will point to the remote repo and can PUSH and PULL changes to it.

๐Ÿ“Œ 3. git add

This command add your changes to a staging area where you can compare your local version with the remote repo code.

it is mandatory to stage the code before committing (push to remote) using git add command. To stage all files use (.) โ€” git add . iin the same repo.

๐Ÿ“Œ 4. git commit

This command saves your changes to your local repository.

Every time you commit you have to add a small message about the changes you made. This will help to keep track of the changes later.

๐Ÿ“Œ 5. git push

This command pushes your changes from the local repository to your remote repository. One can only push theโ€ฆ

--

--

Mr.Javed Multani

Software Engineer | Certified ScrumMasterยฎ (CSM) | UX Researcher | Youtuber | Tech Writer