... | ... | @@ -28,10 +28,10 @@ The above is a very good summary, and you are encouraged to have it open or prin |
|
|
|
|
|
Command | Effect
|
|
|
--- | ---
|
|
|
`git config --global user.name "YOUR_USERNAME"` | Set up your name for your commits.
|
|
|
`git config --global user.email "YOUR_EMAIL"` | Set up the email address for your commits.
|
|
|
<a name="set-username"></a>`git config --global user.name "YOUR_USERNAME"` | Set up your name for your commits.
|
|
|
<a name="set-email"></a>`git config --global user.email "YOUR_EMAIL"` | Set up the email address for your commits.
|
|
|
`git config --global color.ui auto` | Enable some colourful git output.
|
|
|
`git config --global push.default simple` | Set up git to push only the current branch by default.
|
|
|
<a name="set-simple"></a>`git config --global push.default simple` | Set up git to push only the current branch by default.
|
|
|
`git config --global core.editor "gedit -w -s" ` | Set commit message editor to `gedit`. Simple GUI editor.
|
|
|
`git config --global core.editor "vim" ` | Set the default commit message editor to `vim`.
|
|
|
|
... | ... | @@ -124,6 +124,13 @@ You have successfully added your key to the server. You can now get your code fr |
|
|
### First "clone", "change", "commit" and "push"
|
|
|
In this section we will learn how to clone your project down, add changes to it, commit those changes and send them back to the server.
|
|
|
|
|
|
#### Before we being
|
|
|
Before we clone down a project for the first time, there are a few things we should set that will allow us to avoid future questions.
|
|
|
|
|
|
First, set up your username and email address globally with the [`git config`](#setup) commands. This will allow you to identify yourself in a friendly way to the server. You can find the commands [here](#set-username) and [here](#set-email) respectively.
|
|
|
|
|
|
Next, let's set git to only push your current branch when using the `git push` command. This is the recommended default behavior. Use [this](#git-simple) command to achieve this behavior.
|
|
|
|
|
|
#### First project clone
|
|
|
|
|
|
Let's get your code from the server to your local machine.
|
... | ... | |