Before we continue, I want to mention that depending on the way Git is configured on your server, you may not see the same colors that I do. You may also see results (like git diff and git log) differently than I do. In order to ensure yours most closely resembles what you'll see on my screen, configure Git the way I show in the video Configuring Git. I'll do the basics now, but if you want to know more about it, watch that video.
In order to make the changes on the live server, you'll need to SSH into the server. I've already got it open, so I'll switch to that tab before I run the config commands.
- Switch to the "Remote - Live" terminal tab
Required Git Configuration
- git config --global user.name "Git Webite Live" (You might choose to use the server name in this case to differentiate your local commits to the ones performed on the server.)
- git config --global user.email "email@example.com" (Again, you might want to use an email that indicates the server, instead of yourself.)
Optional Git Configuration
- git config --global core.editor "vi" (This sets VI as the editor)
- git config --global color.ui true (Enables colors)
- git config --global core.pager more (Improves results from commands like "git diff" and "git log")
Again, if you don't understand what these commands mean, I highly recommend you watch the video Configuring Git because I explain them more there.