Post-Radicle sync at 2025-06-05 01:07:56
This commit is contained in:
parent
d4edf2afd8
commit
bf03d19403
29 changed files with 351 additions and 1 deletions
97
docs/github/CLI-ONLY_workflow_github_ubuntu.md
Normal file
97
docs/github/CLI-ONLY_workflow_github_ubuntu.md
Normal file
|
@ -0,0 +1,97 @@
|
|||
---
|
||||
|
||||
## 🧭 FULL CLI-ONLY WORKFLOW (Ubuntu + GitHub)
|
||||
|
||||
---
|
||||
|
||||
### 🔹 Step 1 — Install prerequisites
|
||||
|
||||
```bash
|
||||
# Install Git
|
||||
sudo apt update
|
||||
sudo apt install git -y
|
||||
|
||||
# Install GitHub CLI
|
||||
type -p curl >/dev/null || sudo apt install curl -y
|
||||
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | \
|
||||
sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
|
||||
sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
|
||||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] \
|
||||
https://cli.github.com/packages stable main" | \
|
||||
sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
|
||||
sudo apt update
|
||||
sudo apt install gh -y
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 🔹 Step 2 — Authenticate with GitHub
|
||||
|
||||
```bash
|
||||
gh auth login
|
||||
```
|
||||
|
||||
* Choose: `GitHub.com`
|
||||
* Protocol: `SSH`
|
||||
* Authenticate via browser (first time only—after that you're CLI-auth’d)
|
||||
|
||||
---
|
||||
|
||||
### 🔹 Step 3 — Set global Git identity
|
||||
|
||||
```bash
|
||||
git config --global user.name "Your Name"
|
||||
git config --global user.email "your_email@example.com"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 🔹 Step 4 — Create and link a new GitHub repo (CLI-only)
|
||||
|
||||
From inside your project directory:
|
||||
|
||||
```bash
|
||||
mkdir myproject
|
||||
cd myproject
|
||||
git init
|
||||
echo "# My Project" > README.md
|
||||
git add .
|
||||
git commit -m "Initial commit"
|
||||
```
|
||||
|
||||
Now create a GitHub repo **from the CLI**:
|
||||
|
||||
```bash
|
||||
gh repo create myproject --public --source=. --remote=origin --push
|
||||
```
|
||||
|
||||
✅ This:
|
||||
|
||||
* Creates the remote GitHub repo
|
||||
* Links it to your local repo
|
||||
* Pushes your first commit to GitHub
|
||||
|
||||
---
|
||||
|
||||
### 🔹 Step 5 — Make further commits
|
||||
|
||||
```bash
|
||||
# Edit files as needed
|
||||
nano something.txt
|
||||
|
||||
# Stage + commit + push
|
||||
git add .
|
||||
git commit -m "Updated something"
|
||||
git push origin main
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 🔹 Bonus — Clone a GitHub repo entirely from CLI
|
||||
|
||||
```bash
|
||||
gh repo clone your-username/your-repo
|
||||
cd your-repo
|
||||
```
|
||||
|
||||
---
|
Loading…
Add table
Add a link
Reference in a new issue