git clone <URL>
Copy a remote repository to your local directory.
git init
Initializes a Git repository on your local system. You will use this command if you are starting a new Git project.
git status
Shows the state of the current working directory, e.g. how many files have been added/changed, which branch you are on, whether your local copy is up to date with the remote version, etc.
git add <file>
Add the specified file from the local directory to the staging area of Git.
git commit
Convert the staged changes to a snapshot, and save it in the local directory.
git push
Send the commits (snapshots) to the remote repository.
git diff
Show the differences between the working directory and the staging area.
git stash
Move the changes in the working directory into a stash space. This allows you to save your changes for future use, without making a new commit.
git stash pop
Move the changes from the stash back to the working directory.
git remote
View all remote repositories.
git remote add origin <URL>
To add a new host to your working directory.
git pull
Pull all the changes from the remote directory, and merge them with the local changes.
git config --global user.email myemail@domain.com
Set an email which will be associated with the commits made to the repository.
git config --global user.name "user name"
Set username which will be associated with the commits made to the repository.