Skip to content

Instantly share code, notes, and snippets.

View alexperronnet's full-sized avatar
🖤
Altruism

Alex Perronnet alexperronnet

🖤
Altruism
View GitHub Profile
@alexperronnet
alexperronnet / update-email.sh
Created June 10, 2023 04:37
Update the email linked to your previous commit after changing your email address.
#!/bin/bash
set -e
username=""
new_email=""
repos=(
# Add the list of repos here
)
old_emails=(
@alexperronnet
alexperronnet / update-submodules.md
Created September 15, 2022 13:19
How to update Git submodules
  1. Clone repo with submodules
git clone --recurse-submodules git@github.com:${USERNAME}/${REPO}.git
  1. Navigate into repo
cd ${repo}
@alexperronnet
alexperronnet / vite-deploy-gh-pages.sh
Last active September 8, 2022 04:02
Vite - Deploy dist folder to GitHub Pages
#!/usr/bin/env sh
# build
npm run build
# navigate into the build output directory
cd dist
# Initialize a git repository
git init
@alexperronnet
alexperronnet / repo-reset.md
Last active March 16, 2023 21:33
GitHub - Delete commits history from a repository
  1. Create a new orphan branch
git checkout --orphan TEMP_BRANCH
  1. Add all files to the staging area
git add .