namastejs
Version:
A spiritual greeting from your JavaScript code. Because every function deserves a 'Namaste 🙏'
47 lines (45 loc) • 1.67 kB
JavaScript
module.exports = {
name: "Git",
description: "Most-used Git commands for daily development",
updatedAt: "Jan 2025",
learnMore: "https://git-scm.com/docs",
categories: {
BASIC: [
["git status", "Show working tree status"],
["git log --oneline --graph", "Compact commit history"],
["git diff", "View unstaged changes"],
["git add .", "Stage all changes"],
['git commit -m "msg"', "Commit with message"],
],
BRANCHING: [
["git branch", "List branches"],
["git branch -d branch_name", "Delete local branch"],
["git checkout -b branch", "Create & switch branch"],
["git switch branch", "Switch branch (new syntax)"],
["git merge branch", "Merge branch into current"],
],
REMOTE: [
["git remote -v", "List remotes"],
["git fetch", "Fetch changes"],
["git pull origin main", "Pull from remote"],
["git push origin main", "Push to remote"],
],
STASH: [
["git stash", "Save work temporarily"],
["git stash list", "List stashes"],
["git stash pop", "Apply & remove stash"],
["git stash drop", "Delete stash"],
],
CONFIG: [
['git config --global user.name "Name"', "Set username"],
['git config --global user.email "email"', "Set email"],
["git config --list", "Show config"],
],
"UNDO / FIX": [
["git reset --soft HEAD~1", "Undo commit (keep changes)"],
["git reset --hard HEAD~1", "Undo commit (discard changes)"],
["git checkout -- file", "Discard file changes"],
["git revert <hash>", "Safe undo commit"],
],
},
};