What is Git ?
Steps to initialize a git project
How to know your remote url
git remote -v
Start tracking a file
git add <filename>
Start tracking all the files
git add .
commit code
git commit -m "your message"
Current status of directory
git status
Two ways to commit your tracked file
git commit -am "Your message"
or
git add file-name
git commit -m "Your message"
Logs
See logs in git
git log
Limit git log
git log -2
Details of commit
git commit --stat
One line log
git log --pretty=oneline
Graph View
git log --graph
Listing all branches
git branch
Create a new branch
git branch <branch-name>
Checkout to new branch
git checkout branch
Creating and moving to new branch
git checkout -b <branch-name>
Cloning a git project
git clone <remote-url>
Pushing to remote
git push remote-alias branch name
Pushing everything
git push --all
Pulling everything
git pull
Pulling from a branch
git pull remote-alias branch name