-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpush_to_github.sh
More file actions
36 lines (30 loc) · 961 Bytes
/
push_to_github.sh
File metadata and controls
36 lines (30 loc) · 961 Bytes
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
#!/usr/bin/env bash
# Run this once from the project directory to create the GitHub repo and push.
# Requires: gh CLI → brew install gh then gh auth login
set -e
REPO_NAME="qrop"
DESCRIPTION="QR Optical-copy Protocol — transfer files between computers using only a screen and a camera. No internet, no USB."
ACCOUNT="zeroshotmind"
echo "=== Checking gh CLI ==="
if ! command -v gh &>/dev/null; then
echo "ERROR: gh not found. Install it first:"
echo " brew install gh"
echo " gh auth login"
exit 1
fi
echo "=== Checking auth ==="
gh auth status
echo ""
echo "=== Setting git identity ==="
git config user.name "zeroshotmind"
git config user.email "swastikroy1993@gmail.com"
echo ""
echo "=== Creating public repo: $ACCOUNT/$REPO_NAME ==="
gh repo create "$ACCOUNT/$REPO_NAME" \
--public \
--description "$DESCRIPTION" \
--source=. \
--remote=origin \
--push
echo ""
echo "Done! View at: https://github.com/$ACCOUNT/$REPO_NAME"