November 14th, 2020
git add <file>
The git add command lets you add new or changed files in your local directory to the git staging area. This command is usually the first command I utilize in my git workflow unless I'm making use of the git status command, which I'll touch on next.
git status
The git status command displays the state of your working directory and staging area. This command shows your current branch, unstaged changes, and much more.
git commit -m "commit message"
The Git commit command saves your changes to the local repository. m <message> sets the commit message.
git push
The Git push command enables you to push the commits from your local repository to your remote repository.
git checkout
The Git checkout command is used to switch from your current branch in your local repository to another branch of your choice.
git pull
The Git pull command updates the local version of a repository from the remote. I'll advise using the git pull command when you have a newly created branch to avoid merge conflicts.
git branch
The Git pull command lets you create, rename, and deletes branches.
git reset
The Git reset command undoes local changes to match the state of the Git repo.
git fetch
The Git fetch command downloads data from your remote repository but doesn't integrate the potential changes into your current codebase. That's when the Git merge comes in handy.
git merge
The Git merge command is used to integrate changes from another branch.