Learn Git in One Minute
๐ฏ ๐๐ถ๐ ๐๐ผ๐บ๐บ๐ฎ๐ป๐ฑ๐ ๐ฌ๐ผ๐ ๐ฆ๐ต๐ผ๐๐น๐ฑ ๐๐ป๐ผ๐
๐ 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โฆ