A new Git/GitHub tip added every day for 365 days. Practical commands for React Native, Node.js, and web developers.
Commit Messages · 2026-10-08
git commit -m "fix: crash on startup\n\nCloses #42"Linking to an issue will auto-close it when merged to main.
Commit Messages · 2026-10-07
git commit -m "feat: add login" -m "Implements JWT auth with refresh tokens"Add more context in the commit body after the subject.
Commit Messages · 2026-10-06
git commit -m "feat: short and clear message here"GitHub truncates messages longer than 72 characters.
Commit Messages · 2026-10-05
git commit -m "perf: reduce bundle size by 30%"Use perf: for performance improvements.
Commit Messages · 2026-10-04
git commit -m "test: add unit tests for login service"Use test: for adding or updating tests.
Commit Messages · 2026-10-03
git commit -m "refactor: extract auth logic to hook"Use refactor: for code restructuring without behavior change.
Commit Messages · 2026-10-02
git commit -m "docs: update README installation steps"Use docs: for documentation-only changes.
Commit Messages · 2026-10-01
git commit -m "chore: update dependencies"Use chore: for maintenance tasks that don't change logic.
Commit Messages · 2026-09-30
git commit -m "fix: resolve crash on logout"Use fix: for bug fixes.
Commit Messages · 2026-09-29
git commit -m "feat: add user authentication"Use feat: for new features following Conventional Commits.
Productivity · 2026-09-28
git push origin HEADPush current branch without typing its full name.
Productivity · 2026-09-27
# Add to ~/.zshrc: parse_git_branch()Display current git branch in your terminal prompt.
Productivity · 2026-09-26
git config --global pull.rebase trueAlways rebase instead of merge when pulling.
Productivity · 2026-09-25
git config --global push.autoSetupRemote trueAutomatically set upstream on first push of a new branch.
Productivity · 2026-09-24
git config --global core.editor "code --wait"Use VS Code for commit messages and resolving conflicts.
Productivity · 2026-09-23
git config --global init.defaultBranch mainNew repos will use main instead of master.
Productivity · 2026-09-22
git config --listView all your current Git configuration settings.
Productivity · 2026-09-21
code .Open current directory in Visual Studio Code.
SSH · 2026-09-20
ssh-add -lSee which SSH keys are currently loaded.
SSH · 2026-09-19
git remote set-url origin git@github.com:user/repo.gitSwitch remote URL to SSH for password-free push/pull.
SSH · 2026-09-18
ssh -T git@github.comVerify your SSH key works with GitHub.
SSH · 2026-09-17
pbcopy < ~/.ssh/id_ed25519.pubCopy your public key to paste into GitHub settings.
SSH · 2026-09-16
ssh-keygen -t ed25519 -C "you@example.com"Create a secure SSH key for GitHub authentication.
.gitignore · 2026-09-15
echo 'build/' >> .gitignoreIgnore entire build or dist directories.
.gitignore · 2026-09-14
echo '*.log' >> .gitignoreWildcard pattern to ignore all files with .log extension.
.gitignore · 2026-09-13
git config --global core.excludesfile ~/.gitignore_globalSet a global gitignore that applies to all repos.
.gitignore · 2026-09-12
git rm --cached filename.jsStop tracking a file without deleting it locally.
.gitignore · 2026-09-11
echo '.env' >> .gitignoreKeep secrets out of your repository.
.gitignore · 2026-09-10
echo 'node_modules/' >> .gitignoreNever commit node_modules — always ignore them.
.gitignore · 2026-09-09
touch .gitignoreCreate the file that tells Git what to ignore.
Advanced Git · 2026-09-08
git show --stat abc1234See which files were changed in a specific commit.
Advanced Git · 2026-09-07
git rev-list --count HEADSee total number of commits in the repo.
Advanced Git · 2026-09-06
git archive --format=zip HEAD > project.zipExport current repo state as a zip file.
Advanced Git · 2026-09-05
git worktree add ../hotfix hotfix/urgentCheck out a second branch in a separate folder simultaneously.
Advanced Git · 2026-09-04
git submodule update --init --recursiveInitialize and update all submodules.
Advanced Git · 2026-09-03
git submodule add https://github.com/user/repoInclude another git repo inside your repo.
Advanced Git · 2026-09-02
git add -pInteractively choose which changes to stage, hunk by hunk.
Advanced Git · 2026-09-01
git log -S "broken function"Search for commits that added or removed a specific string.
Advanced Git · 2026-08-31
git blame filename.jsShow which commit and author last changed each line.
Advanced Git · 2026-08-30
git checkout abc1234Use reflog to find the hash and checkout to recover.
Advanced Git · 2026-08-29
git reflogSee every action you have done — useful for recovering lost commits.
Advanced Git · 2026-08-28
git bisect start && git bisect bad && git bisect good v1.0Binary search through commits to find when a bug was introduced.
Advanced Git · 2026-08-27
git cherry-pick abc1234Apply a specific commit from another branch to current branch.
Aliases · 2026-08-26
git config --global --list | grep aliasSee all aliases you have configured.
Aliases · 2026-08-25
git config --global alias.save "stash push -m"Type git save 'message' to stash with name.
Aliases · 2026-08-24
git config --global alias.undo "reset --soft HEAD~1"Type git undo to uncommit last change.
Aliases · 2026-08-23
git config --global alias.lg "log --oneline --graph --all"Type git lg for a visual commit graph.
Aliases · 2026-08-22
git config --global alias.br branchType git br to list branches.
Aliases · 2026-08-21
git config --global alias.co checkoutType git co instead of git checkout.
Aliases · 2026-08-20
git config --global alias.st "status -s"Type git st instead of git status -s.
GitHub Actions · 2026-08-19
uses: actions/setup-node@v4\n with:\n node-version: 20Install a specific Node.js version in your workflow.
GitHub Actions · 2026-08-18
uses: actions/checkout@v4Essential first step — clone your repo inside the runner.
GitHub Actions · 2026-08-17
uses: actions/cache@v3Speed up workflows by caching node_modules or other deps.
GitHub Actions · 2026-08-16
secrets.MY_API_KEYAccess a secret stored in GitHub repo settings.
GitHub Actions · 2026-08-15
on:\n push:\n branches: [main]Trigger workflow whenever code is pushed to main.
GitHub Actions · 2026-08-14
cron: '0 9 * * *'Run a workflow every day at 9 AM UTC using cron syntax.
GitHub Actions · 2026-08-13
gh run rerun --failedRetry only the failed jobs in a workflow.
GitHub Actions · 2026-08-12
gh run view --logRead the full log output of a workflow run.
GitHub Actions · 2026-08-11
gh workflow listSee all workflows in the repository.
GitHub Actions · 2026-08-10
gh workflow run daily.ymlManually start a workflow from terminal.
GitHub CLI · 2026-08-09
gh run watchFollow a running workflow in real time.
GitHub CLI · 2026-08-08
gh run listSee recent GitHub Actions runs.
GitHub CLI · 2026-08-07
gh search code "useAuth" --language typescriptSearch for code patterns across GitHub.
GitHub CLI · 2026-08-06
gh search repos "react native starter" --sort starsFind popular repos matching a topic.
GitHub CLI · 2026-08-05
gh release listSee all published releases.
GitHub CLI · 2026-08-04
gh release create v1.0.0 --title "v1.0.0" --notes "First release"Publish a new GitHub release.
GitHub CLI · 2026-08-03
gh issue edit 42 --assignee @meAssign an issue to yourself quickly.
GitHub CLI · 2026-08-02
gh issue close 42Close an issue from the terminal.
GitHub CLI · 2026-08-01
gh issue view 42Read a specific issue by number.
GitHub CLI · 2026-07-31
gh issue listSee all open issues in current repo.
GitHub CLI · 2026-07-30
gh issue create --title "Bug: crash on login"Open a new GitHub issue from terminal.
GitHub CLI · 2026-07-29
gh pr close 123Close a pull request without merging.
GitHub CLI · 2026-07-28
gh pr merge 123 --squashMerge a pull request using squash strategy.
GitHub CLI · 2026-07-27
gh pr checkout 123Switch to the branch of a pull request locally.
GitHub CLI · 2026-07-26
gh pr view 123Read the details of a specific pull request.
GitHub CLI · 2026-07-25
gh pr listSee all open pull requests in current repo.
GitHub CLI · 2026-07-24
gh pr create --title "feat: new feature" --fillOpen a pull request from current branch.
GitHub CLI · 2026-07-23
gh repo fork owner/repoFork a repository to your account.
GitHub CLI · 2026-07-22
gh repo view --webOpen current repo in your default browser.
GitHub CLI · 2026-07-21
gh repo listSee all your GitHub repositories.
GitHub CLI · 2026-07-20
gh repo clone owner/repoClone any GitHub repository easily.
GitHub CLI · 2026-07-19
gh repo create my-app --publicCreate a new GitHub repository from terminal.
GitHub CLI · 2026-07-18
gh auth statusVerify you are logged in and see your username.
GitHub CLI · 2026-07-17
gh auth loginAuthenticate with your GitHub account.
GitHub CLI · 2026-07-16
brew install ghInstall the official GitHub CLI on macOS.
Tags · 2026-07-15
git tag -d v1.0.0Remove a local tag.
Tags · 2026-07-14
git push origin --tagsUpload all local tags to remote.
Tags · 2026-07-13
git tagShow all tags in the repository.
Tags · 2026-07-12
git tag -a v1.0.0 -m "Release v1.0.0"Tag with a message — best practice for releases.
Tags · 2026-07-11
git tag v1.0.0Mark a specific commit as a release version.
Remote · 2026-07-10
git pull --rebasePull and rebase instead of merge for cleaner history.
Remote · 2026-07-09
git fetch originDownload remote changes without applying them.
Remote · 2026-07-08
git remote set-url origin https://github.com/user/new-repo.gitUpdate the URL of an existing remote.
Remote · 2026-07-07
git remote add origin https://github.com/user/repo.gitConnect your local repo to a remote.
Remote · 2026-07-06
git remote -vSee the fetch and push URLs for your remotes.
Undo · 2026-07-05
git clean -fdDelete untracked files and directories.
Undo · 2026-07-04
git checkout .Revert all unstaged changes in working directory.
Undo · 2026-07-03
git add forgotten.js && git commit --amend --no-editAdd a file to the previous commit without changing message.
Undo · 2026-07-02
git commit --amend -m "correct message"Change the message of your last commit before pushing.
Undo · 2026-07-01
git revert abc1234Create a new commit that undoes a specific commit safely.
Undo · 2026-06-30
git reset --hard HEAD~1Completely remove last commit and all changes. Dangerous!
Undo · 2026-06-29
git reset HEAD~1Uncommit and unstage changes but keep files.
Undo · 2026-06-28
git reset --soft HEAD~1Uncommit but keep all your changes staged.
Stash · 2026-06-27
git stash clearDelete all stashed entries at once.
Stash · 2026-06-26
git stash drop stash@{0}Delete a specific stash entry.
Stash · 2026-06-25
git stash applyApply stash but keep it in the stash list.
Stash · 2026-06-24
git stash popRestore the latest stash and remove it from list.
Stash · 2026-06-23
git stash listSee all saved stashes.
Stash · 2026-06-22
git stash push -m "wip: auth screen"Save stash with a descriptive label.
Stash · 2026-06-21
git stashTemporarily save changes without committing.
Rebase · 2026-06-20
git rebase -i HEAD~3 # change pick to squashCombine multiple commits into one clean commit.
Rebase · 2026-06-19
git rebase -i HEAD~3Edit, squash, or reorder the last 3 commits.
Rebase · 2026-06-18
git rebase --continueAfter fixing a conflict during rebase, continue the process.
Rebase · 2026-06-17
git rebase --abortCancel a rebase in progress and restore original state.
Rebase · 2026-06-16
git rebase mainReplay your branch commits on top of main.
Merging · 2026-06-15
git add filename.js && git commitAfter fixing conflicts, stage and commit to complete merge.
Merging · 2026-06-14
git statusAfter a conflict, git status shows which files need fixing.
Merging · 2026-06-13
git merge --abortCancel an in-progress merge and go back to before.
Merging · 2026-06-12
git merge --no-ff feature/loginAlways create a merge commit for cleaner history.
Merging · 2026-06-11
git merge feature/loginMerge another branch into your current branch.
Branches · 2026-06-10
git push -u origin feature/loginPush and set upstream tracking for a new branch.
Branches · 2026-06-09
git branch -m new-nameRename the branch you are currently on.
Branches · 2026-06-08
git push origin --delete feature/loginRemove a branch from the remote repository.
Branches · 2026-06-07
git branch -D feature/loginDelete a branch even if it has unmerged changes.
Branches · 2026-06-06
git branch -d feature/loginDelete a branch that has been merged.
Branches · 2026-06-05
git branch -aShow local and remote branches.
Branches · 2026-06-04
git switch -c feature/loginNewer syntax to create and switch branches.
Branches · 2026-06-03
git checkout -b feature/loginCreate a new branch and switch to it immediately.
Branches · 2026-06-02
git checkout feature/loginSwitch your working directory to another branch.
Branches · 2026-06-01
git branch feature/loginCreate a new branch without switching to it.
Git Basics · 2026-05-31
git restore filename.jsRevert a file back to last committed state.
Git Basics · 2026-05-30
git restore --staged filename.jsRemove a file from staging without losing changes.
Git Basics · 2026-05-29
git diff --stagedShow changes that are staged and ready to commit.
Git Basics · 2026-05-28
git diffShow unstaged changes in your working directory.
Git Basics · 2026-05-25
git log --oneline -5Limit log output to the last 5 commits.
Git Basics · 2026-05-24
git log --oneline --graph --allVisualize branches and merges in the terminal.
Git Basics · 2026-05-23
git log --onelineSee all commits in a compact one-line format.
Git Basics · 2026-05-22
git pullFetch and merge changes from the remote branch.
Git Basics · 2026-05-21
git push origin mainUpload your commits to the remote repository.
Git Basics · 2026-05-20
git commit -am "fix: typo in header"Stage tracked files and commit in one command.
Git Basics · 2026-05-19
git commit -m "feat: add login screen"Save staged changes with a descriptive message.
Git Basics · 2026-05-18
git add filename.jsStage a specific file only.
Git Basics · 2026-05-17
git add .Stage every changed file in current directory.
Git Basics · 2026-05-16
git status -sCompact version of git status — M = modified, ? = untracked.
Git Basics · 2026-05-15
git statusSee which files are staged, unstaged, or untracked.
Git Basics · 2026-05-14
git clone https://github.com/user/repo.gitDownload a remote repository to your machine.
Git Basics · 2026-05-13
git initStart tracking a project with Git.
Git Basics · 2026-05-12
git config --global user.email "you@example.com"Set your email for all commits globally.
Git Basics · 2026-05-11
git config --global user.name "Your Name"Set your name for all commits globally.
Git Basics · 2026-05-10
git --versionAlways know what version of Git you are running.
New tip added every day. Star the repo to follow along!