Skip to content

Instantly share code, notes, and snippets.

@hughdbrown
Created February 27, 2025 21:34
Show Gist options
  • Save hughdbrown/6bc69639bfcc9f69524bc2947bb3f97c to your computer and use it in GitHub Desktop.
Save hughdbrown/6bc69639bfcc9f69524bc2947bb3f97c to your computer and use it in GitHub Desktop.
Setup AIE5 with upstream/main and origin/main
#!/bin/sh
set -eux -o pipefail
export GIT_USER=hughdbrown
export GIT_REPO_NAME_USER=AIE5 # What the user is going to call the repo
export GIT_REPO_NAME_AI_MAKER=AIE5 # What the repo is already called by AI_MAKER
mkdir -p ~/workspace/${GIT_USER}/maven.com/${GIT_REPO_NAME_USER}
cd ~/workspace/${GIT_USER}/maven.com/${GIT_REPO_NAME_USER}
# Make git repo
git init .
# git-remote-ify the AI-Maker-Space repo
git remote add upstream [email protected]:AI-Maker-Space/${GIT_REPO_NAME_USER}.git
git remote -v
# origin [email protected]:${GIT_USER}/${GIT_REPO_NAME_USER}.git (fetch)
# origin [email protected]:${GIT_USER}/${GIT_REPO_NAME_USER}.git (push)
# upstream [email protected]:AI-Maker-Space/${GIT_REPO_NAME_AI_MAKER}.git (fetch)
# upstream [email protected]:AI-Maker-Space/${GIT_REPO_NAME_AI_MAKER}.git (push)
# Pull repo from upstream
git pull upstream main --allow-unrelated-histories
git branch -M main
git remote add origin [email protected]:${GIT_USER}/${GIT_REPO_NAME_USER}.git
git push -u origin main
git push --set-upstream origin main
@awdemos
Copy link

awdemos commented Feb 27, 2025

Life saver!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment