Git Cheatsheet for beginners

Hi there, I am a software programmer with lots of interests in learning new age technologies. I enjoy writing clean and crisp code.
Hello there, thank you for visiting my first blog, here I have attempted to create a quick and a basic cheatsheet of github for beginners.
Commands are as follows:
- git init
This command is to initialize an empty repository inside a directory. This is usually the first command that is fired while using git git status
This command displays all status of all files in a particular repository.git add
- git add .
- git add
This command is used to add files into the staging area in git.
There are two possible ways to use this command,
1. using . Eg: git add . This will add all the files.
2. using filename Eg: git add index.html This will add only index.html file
- git commit -m "message" ``` This command is used to commit all the files There are two possible ways to use this command,
- using . Eg: git add . This will add all the files.
using filename Eg: git add index.html This will add only index.html file ```
git config
This command is used to configure the user details
git config --global user.email "youremail@yourdomain.com"
git config --global user.email "youremail@yourdomain.com"
git remote add
This command is used when the code from local repository is pushed to remote repository.git push
This command is used when push the code from local repository to remote repository.
I hope this helps in understanding git! Thank you!!


