-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup_github.sh
37 lines (29 loc) · 1.03 KB
/
setup_github.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
# Generate SSH key
ssh-keygen -t ed25519 -C "[email protected]" -f ~/.ssh/github_key -N ""
# Start ssh-agent and add the key
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/github_key
# Display the public key to copy to GitHub
echo "Copy this public key to GitHub (https://github.com/settings/ssh/new):"
echo "-------------------"
cat ~/.ssh/github_key.pub
echo "-------------------"
# Initialize git repository
git init
# Configure git
git config --global user.name "Deep Tree Echo"
git config --global user.email "[email protected]"
# Add files
git add .
# Create initial commit
git commit -m "Initial commit: Deep Tree Echo project setup"
# Instructions for after adding SSH key to GitHub
echo ""
echo "After adding the SSH key to GitHub:"
echo "1. Create a new repository on GitHub (don't initialize with README)"
echo "2. Run these commands (replace YOUR_REPO with your repository name):"
echo ""
echo "git remote add origin [email protected]:YOUR_USERNAME/YOUR_REPO.git"
echo "git branch -M main"
echo "git push -u origin main"