git init
: Initialize / create a new local repository. (Do this only once)git remote add origin [url without brackets]
: Connect your local repo to an online repo. (Do this only once)git add .
: Add all files to staging area.git commit -m "first commit"
: Commit changes with appropriate message.git push origin master
: Send changes to the master branch of your remote repository.git pull origin master
: Fetch and merge changes from the remote repo to your working repo.
git status
: List the files you've changed and those you still need to add or commit.git log
: Shows commit history.