DEV Community

Discussion on: Explain git config Like I'm Five

Collapse
 
rhymes profile image
rhymes

Hi, Jess.

Judging from file you have three remotes set: heroku, github/production and github/staging

Your branch is tracking the master branch of the github/production repo.

Heroku points to your staging environment.

Going back to the config file, there's nothing magical to it. It's what the name say: the configuration of your git repository.

Every repo has one, you sometimes also have a global one in ~/.gitconfig

Collapse
 
jessachandler profile image
Jess Chandler

Thanks for the response. I know it is not magical.

What is not clear to me is how I would be confident what each of the things means.

For example,
What commands can be in a .git/config file?
What are the options under each item?
What is the difference between merge and fetch?

Collapse
 
rhymes profile image
rhymes

Keep in mind that practically always you don't edit the gitconfig file manually, but trough git config.

This is a good tutorial.

If you want to know each and every option the gitconfig can have you have to read the documentation.

What is the difference between merge and fetch?

git fetch means "go to the remote repository and download the new changes to our local repository". git merge means "integrate this set of changes into this other branch". git pull means more or less "go to the remote repository, download the new changes, merge such changes in the branch" (git fetch + git merge)