Cleaned up the Git How-to a little and made infor more accurate
This commit is contained in:
@@ -1,19 +1,25 @@
|
|||||||
📜 Git Basics for Our Discord Bot Project
|
📜 Git Basics for Our Discord Bot Project
|
||||||
(so we don’t break things accidentally)
|
(so we don’t break things accidentally)
|
||||||
1️⃣ Cloning the repo (first time setup)
|
|
||||||
|
|
||||||
Run this in your terminal (replace with the Gitea URL for our project):
|
|
||||||
|
1️⃣ Cloning the repo (***first time setup***)
|
||||||
|
|
||||||
|
Run this in your terminal:
|
||||||
|
|
||||||
git clone https://gitea.wheelytho.com/joshypoo/DiscordTipBot
|
git clone https://gitea.wheelytho.com/joshypoo/DiscordTipBot
|
||||||
|
|
||||||
This creates a folder with all the files and already sets up the remote.
|
This creates a folder with all the files and already sets up the remote.
|
||||||
|
|
||||||
|
|
||||||
2️⃣ Making sure you’re on the right branch
|
2️⃣ Making sure you’re on the right branch
|
||||||
|
|
||||||
Check which branch you’re on:
|
Check which branch you’re on:
|
||||||
|
|
||||||
git branch
|
git branch
|
||||||
|
|
||||||
If you see * master (or * main), you’re good.
|
If you see * master, you’re good.
|
||||||
|
|
||||||
|
|
||||||
3️⃣ Pulling latest changes from Gitea
|
3️⃣ Pulling latest changes from Gitea
|
||||||
|
|
||||||
Before making edits:
|
Before making edits:
|
||||||
@@ -24,7 +30,7 @@ If it gives an error like “no tracking information”, link the branch:
|
|||||||
|
|
||||||
git branch --set-upstream-to=origin/master master
|
git branch --set-upstream-to=origin/master master
|
||||||
|
|
||||||
(or use main if that’s our branch name).
|
|
||||||
4️⃣ Making changes & committing
|
4️⃣ Making changes & committing
|
||||||
|
|
||||||
After editing files:
|
After editing files:
|
||||||
@@ -32,14 +38,18 @@ After editing files:
|
|||||||
git add .
|
git add .
|
||||||
git commit -m "Describe what you changed"
|
git commit -m "Describe what you changed"
|
||||||
|
|
||||||
|
|
||||||
5️⃣ Pushing your changes to Gitea
|
5️⃣ Pushing your changes to Gitea
|
||||||
|
|
||||||
git push
|
git push
|
||||||
|
|
||||||
|
|
||||||
6️⃣ The golden rule
|
6️⃣ The golden rule
|
||||||
|
|
||||||
Always git pull before you start making changes.
|
Always git pull before you start making changes.
|
||||||
It avoids merge conflicts and sadness.
|
It avoids merge conflicts and sadness.
|
||||||
|
|
||||||
|
|
||||||
7️⃣ VS Code Tip
|
7️⃣ VS Code Tip
|
||||||
|
|
||||||
The Source Control tab (Ctrl+Shift+G) lets you stage, commit, and push without typing commands.
|
The Source Control tab (Ctrl+Shift+G) lets you stage, commit, and push without typing commands.
|
||||||
|
|||||||
Reference in New Issue
Block a user