#quickstart #smb
## **Install Git**
First, you'll need to install Git on your new PC. Here's how you can do it:
- Visit the Git download page at https://git-scm.com/download/win and the download should start automatically.
- Once downloaded, run the executable to start the installation process.
- During the installation, it is okay to leave all the default settings as they are, unless you have specific changes you want to make.
## **Create a GitHub account**
- [GitHub](https://www.github.com)
## **Configure your GitHub account**
After installing Git, you'll need to configure your account. Here's how:
- Open the Git Bash terminal. You can find it by searching "Git Bash" in the Start Menu.
- Once you've opened Git Bash, you'll need to set your GitHub username and email. Input the following commands (replace "yourusername" and "
[email protected]" with your actual GitHub username and email):
```
git config --global user.name "yourusername"
git config --global user.email "
[email protected]"
```
- If you want to confirm that those configurations are set, you can use these commands:
```
git config --global user.name
git config --global user.email
```
## **Connect your GitHub account**
If you want to connect to GitHub without having to supply your username/password each time you push, you can use SSH keys or set up credential caching:
- **SSH Keys**: SSH keys are a way to identify yourself to an online server, using an encrypted message. It's a secure way that doesn't involve typing in your password every time. Here's how to set it up:
- First, check for existing ssh keys on your computer. In Git Bash, enter:
```
ls -al ~/.ssh
```
- If you see files named `id_rsa.pub`, `id_rsa`, `id_ecdsa.pub`, `id_ecdsa`, `id_ed25519.pub` or `id_ed25519`, then you have existing SSH keys. If not, you'll need to generate new ones. In Git Bash, enter:
```
ssh-keygen -t rsa -b 4096 -C "
[email protected]"
```
- Hit enter when asked where to save the key, this will use the default location.
- At the prompt, type a secure passphrase.
- Once the key is generated, add it to the ssh-agent:
```
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
```
- Now, you'll add your SSH key to your GitHub account. You'll first need to copy your SSH key to your clipboard. In Git Bash, enter:
```
clip < ~/.ssh/id_rsa.pub
```
- On GitHub, go to the top right corner of any page, click your profile photo, then click **Settings**.
- In the user settings sidebar, click **SSH and GPG keys**.
- Click **New SSH key or Add SSH key**.
- Paste your key into the "Key" field.
- Click **Add SSH key**.
- **Credential Caching**: Git has a credential caching feature that can remember your GitHub username and password every time it talks to GitHub. Here's how to set it up:
- In Git Bash, enter the following:
```
git config --global credential.helper wincred
```
- This will remember your credentials for 15 minutes after you've entered them, then you'll need to enter them again. If you want Git to remember your credentials indefinitely, you can enter the following command:
```
git config --global credential.helper store
```