Trending

#GitCommand

Latest posts tagged with #GitCommand on Bluesky

Posts tagged #GitCommand

Practice Git With Gitea

Practice Git With Gitea

ฝึกใช้คำสั่ง Git บน Gitea ดีไหม?

อ่านต่อ : www.blockdit.com/posts/69d0c1...

#ShoperGamer #Gitea #Git #GitCommand #Practice #CLI #Private #Knowledge #Study #Feed

3 0 0 0
Preview
Step to save your life when you confused push any code or file to your branch. ## 1. Find your committed hash by : git log ## 2. After found your commit hash you need revert it by : git revert <commit-hash> ## 3. choose one at bellow with responsibility: ⸻ 🟢 Uncommit last commit (keep files): git reset --soft HEAD~1 ✅ Files stay staged, just remove commit. ⸻ 🟡 Uncommit & Unstage (keep changes in working directory): git reset --mixed HEAD~1 ✅ Files stay, but unstaged (not in commit). ⸻ 🔴 Uncommit & Remove changes: git reset --hard HEAD~1 ⚠️ Files & commit both gone! Careful! ⸻ 🟣 Uncommit pushed commit (force push): git reset --soft HEAD~1 git push --force ✅ Removes commit on remote branch too. ⸻
0 0 0 0