Moving Git configuration to separate article

This commit is contained in:
Lucas Hinderberger 2020-10-03 19:36:18 +02:00 committed by Gitea
parent 3da34f5c1f
commit 43603978ff
2 changed files with 24 additions and 9 deletions

View file

@ -16,6 +16,8 @@ Here we provide step-by-step instructions to install it.
## Linux
On Linux, you can install Git directly from your package manager. Check out [Git's official documentation](https://git-scm.com/download/linux) for the right command for your distro.
Please see also the article [Configuring Git](/git/configuring-git), which describes how to set up your name and email address for Git.
## macOS
There are [several possibilities](https://git-scm.com/download/mac) to install Git on macOS. This guide will show you how to install Git using the Homebrew package manager. You will need to be on macOS High Sierra (10.13) or higher.
@ -32,6 +34,9 @@ To update Git, run the following command.
% brew upgrade git
```
### Configure
You now managed to get Git up and running. Please proceed as described in the article [Configuring Git](/git/configuring-git) to set up your name and email address for Git.
## Windows 10
There are several possibilities to install Git on Windows. An easy one is to use Gits install wizard, shown here.
@ -82,16 +87,9 @@ Git can be used through the `Command Prompt` (the traditional Windows command li
`Git Bash` is what comes with your Git installation. You can access it from the Start Menu: `Git > Git Bash`.
### Configure
You now managed to get Git up and running. The first thing you must do, before you can use your fresh installation of Git, is to tell Git your name and email address. You only have to do this once. This is easily done with `Git Bash`:
You now managed to get Git up and running. Please proceed as described in the article [Configuring Git](/git/configuring-git) to set up your name and email address for Git.
```bash
git config --global user.name 'knut'
git config --global user.email 'knut@example.com'
git config --global --list
```
The username can be anything, but it is important that the email is the same as the one you use on Codeberg.
The first time you push/pull (see [Clone & Commit via HTTP](/git/clone-commit-via-http)), it will ask for your Codeberg credentials. If you did not change this setting during installation, these credentials will be saved by Windows in its [Credential Manager](https://support.microsoft.com/en-us/help/4026814/windows-accessing-credential-manager). This is also where you have to go in order to change them.
Note that the first time you push/pull (see [Clone & Commit via HTTP](/git/clone-commit-via-http)), Git will ask for your Codeberg credentials. If you did not change this setting during installation, these credentials will be saved by Windows in its [Credential Manager](https://support.microsoft.com/en-us/help/4026814/windows-accessing-credential-manager). This is also where you have to go in order to change them.
### Update
To update Git, the easiest way is to download and run the latest version of the installer and follow the previous steps. Make sure that you run the new installer with the same rights (administrator or user) as for the original installation. If not, it will be installed twice and that will create a mess.

View file

@ -0,0 +1,17 @@
---
eleventyNavigation:
key: ConfiguringGit
title: Configuring Git
parent: Git
---
Once you managed to get Git up and running, the first thing you must do before you can use your fresh installation of Git is to tell Git your name and email address. You only have to do this once. This is easily done with `Git Bash`:
```bash
git config --global user.name 'knut'
git config --global user.email 'knut@example.com'
git config --global --list
```
The username can be anything, but it is important that the email is the same as the one you use on Codeberg. That is because the email address will later be used to assign your commits to your account.
> If you do not wish to include your email address with your commits, you can opt to specify `USERNAME@noreply.codeberg.org` here instead, where USERNAME is your Codeberg username