Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions new-git-install-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ git config --global user.name "crybx"
git config --global user.email "crybx@users.noreply.github.com"
```

### set user for single repo

from within the repo:

```
git config user.name "Username"
git config user.email "your.email@example.com"
```

### default settings I like

```
Expand All @@ -41,23 +50,30 @@ These are:

### set line endings setting

`git config core.autocrlf <true/false>`
`git config core.autocrlf <true/false/input>`

- false means don't convert anything
- true is what you want if all work will be done on Windows
- input means pull line endings as they are in the repo but convert to LF on commit

I've read so much about git and line endings, and I still get frustrated. I don't like any of the options.

### generate an SSH key
### generate an SSH key for GitHub

On pc, per GitHub's instructions (use the email you would use to log in to GitHub):
On pc, per [GitHub's instructions](https://docs.github.com/en/authentication/connecting-to-github-with-ssh) (use the email you would use to log in to GitHub):

`ssh-keygen -t ed25519 -C "your_email@example.com"`

> Note: If you are using a legacy system that doesn't support the Ed25519 algorithm, use:
>
> `ssh-keygen -t rsa -b 4096 -C "your.email@example.com"`

copy the contents of the id_ed25519.pub file to your clipboard (for pasting in to GitHub):

`pbcopy < ~/.ssh/id_ed25519.pub`

### generate an SSH key

on pc:

`ssh-keygen -t rsa -C "your.email@example.com"`
Expand Down