# Git Commands
### `git clone [enter your url here]`
This will clone a branch from a repo onto a local device
### `git branch`
This shows you a list of the branchs in your local directory
### `git fetch `
This prompts all the branches in the repo you are working on and makes them avaliable for you to access
### `git checkout -b [branch name]`
This allows you to create a new branch and move into it
Remove the -b to just move to a particular branch
### `git reset --hard`
This will reset to the last head before merges or changes were made
This will bring you back to the last master commit
### `git reset --soft`
This will collapse all the commits within a repo into one commit
### `git status`
This shows the status of modified or uncommitted changes on your local
### `git pull/git push`
Pushes or pulls changes made to the branch that are on the repo
### `git commit -m "[enter your message here]"`
Creates a commit and adds a message for the commit
### `git commit --amend "[enter your amended message here]"`
Amends the commit message for a particular commit
## Resolving Conflicts
Before merging into the master branch, is important to look to see if there will be any merge conflicts
You do this by doing the following:
1. `git checkout master`
2. `git pull`
3. `git checkout [whatever branch you were on]`
4. `git merge master`
If on step 4 you see that there are merge conflicts, you have to open up each of the files that have the merge conflict and choose between the incoming or current change to remain in your branch
* The incoming change is what exists on master
* The current change is what exists on your branch
Once these conflicts have been resolved, add all the files that have been modified and commit these changes