Files
DiscordTipBot/How_To_git101.txt

64 lines
1.3 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

📜 Git Basics for Our Discord Bot Project
(so we dont break things accidentally)
1⃣ Cloning the repo (***first time setup***)
Run this in your terminal:
git clone https://gitea.wheelytho.com/joshypoo/DiscordTipBot
This creates a folder with all the files and already sets up the remote.
2⃣ Making sure youre on the right branch
Check which branch youre on:
git branch
If you see * master, youre good.
3⃣ Pulling latest changes from Gitea
Before making edits:
git pull
If it gives an error like “no tracking information”, link the branch:
git branch --set-upstream-to=origin/master master
4⃣ Making changes & committing
After editing files:
git add .
git commit -m "Describe what you changed"
5⃣ Pushing your changes to Gitea
git push
6⃣ The golden rule
Always git pull before you start making changes.
It avoids merge conflicts and sadness.
7⃣ VS Code Tip
The Source Control tab (Ctrl+Shift+G) lets you stage, commit, and push without typing commands.
The Sync Changes button does a push + pull together — good for quick updates.
If anyone gets really stuck, we can reset their local copy with:
git fetch origin
git reset --hard origin/master
⚠ This will erase local changes — use only if you want a clean slate.