Creating a new repository in the current working directory
git init
see what files are and arent in staging
git status
Adding Files to staging
git add filename.ext #Add a single file
git add -A #add all unstaged files throughout repo
git add . #add all files in current directory and sub directories
to commit
git commit ## will open an editor to write a commit message
git commit -m "commit message"
git remotes
git remote add <name> <URL> ## add a remote
git remote rm <name> ## remove a remote
git remote -v ## list all the current remotes
push and pull
git push <remote_name> <branch_name> ## Sending the remote commits
git pull <remote_name> <branch_name> ## receiving commits from the remote
git clone
git clone <URL_OF_REPO>
git branch
git branch ## see list of branches
git branch <name_of_new_branch> ## create a new branch
git checkout
git checkout <branch_name> ## switch to a branch
git checkout <commit_hash> ## switch to a particular commit
git checkout <tag_name> ## switch a particular tag (named commit)
git checkout -b <branch_name> ## creates a new branch and switches to it
git merge
git merge <target_branch_name> ## merges the target branches commits into the commits of the current branch your on