From a1c7df4dded5226b52b8b6d99ca4d838078cbdc6 Mon Sep 17 00:00:00 2001 From: Timothy Middelkoop Date: Thu, 30 May 2024 21:32:29 +0000 Subject: [PATCH] Persistant global git configuration for PAT --- Notes.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Notes.md b/Notes.md index ddc7fdd..30a7e12 100644 --- a/Notes.md +++ b/Notes.md @@ -164,7 +164,7 @@ RStudio keyboard shortcuts: Git Configuration: -Configure username, email address, and enable password saving for your new project. Run in terminal once after the project has been created. Note the use of double quotes. +For password based projects, configure username, email address, and enable password saving for your new project. Run in terminal once after the project has been created. Note the use of double quotes. ```bash git config credential.helper cache @@ -174,6 +174,18 @@ git config --local --list ``` *Please note we do not use `--global` since no global settings are saved in this Environment. +For personal access token projects, configure a persistent git configuration. Use this code in a Bash script or Bash notebook and run once after staring a new environment. Note the use of double quotes. +```bash +#!/bin/bash +ln -sfv ~/work/.gitconfig ~/ +ln -sfv ~/work/.git-credentials ~/ + +git config --global credential.helper store +git config --global user.name "First Last" +git config --global user.email "first_last@skc.edu" +git config --global --list +``` + Git Status: Check the status of your project with the remote repository. In a terminal run: