diff --git a/new-git-install-config.md b/new-git-install-config.md index 5d4259c..1c50a0b 100644 --- a/new-git-install-config.md +++ b/new-git-install-config.md @@ -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 ``` @@ -41,16 +50,17 @@ These are: ### set line endings setting -`git config core.autocrlf ` +`git config core.autocrlf ` - 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"` @@ -58,6 +68,12 @@ On pc, per GitHub's instructions (use the email you would use to log in to GitHu > > `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"`