All tags
staging
Narrow down
Git15
- Tip
git status --ignored -sgit status with ignored shows the files your gitignore hidesLists ignored files next to the usual status, so you see what git is hiding.30 Nov 2026 - Tip
git clean -n -d -Xgit clean -X removes only ignored files like build outputDeletes build output and other ignored files while leaving your untracked work alone.30 Nov 2026 - Tip
git restore -p src/app.jsgit restore -p throws away only the changes you pickDiscards selected hunks from your working tree and keeps the rest of your edits.30 Nov 2026 - Tip
git add -N src/export.pygit add -N makes a new file show up in git diffRegisters a new file without staging its content, so diffs and add -p see it.30 Nov 2026 - Tip
git diff HEADgit diff HEAD shows staged and unstaged changes togetherCompares your working tree with the last commit, staged or not.30 Nov 2026 - Tip
git stash push --keep-indexgit stash with keep-index lets you test only what you stagedHides unstaged edits so you can run tests on exactly what you are about to commit.30 Nov 2026 - Tip
git add -ugit add -u stages edits and deletions but skips new filesStages every change to files git already knows, without picking up untracked files.30 Nov 2026 - Tip
git add .gitattributesgit add with renormalize fixes line endings after a .gitattributes changeRe-applies your line ending rules to files that are already in the repository.30 Nov 2026 - Tip
git commit -m "Fix typo in readme" README.mdgit commit with a path commits just that file and ignores the rest of the indexCommits the current version of the files you name, while other staged work stays staged.30 Nov 2026 - Tip
git stash push -m "config experiment" -- src/config.jsgit stash push with a path stashes just one filePuts changes to selected files aside and leaves your other edits in place.30 Nov 2026 - Tip
git commit -m "Stop tracking .env"git rm with cached stops tracking a file but keeps it on diskRemoves a committed file from the repository while leaving your local copy in place.30 Nov 2026 - Tip
git commit -vgit commit -v shows your diff while you write the messageShows the staged diff in your editor while you write the commit message.27 Nov 2026 - Tip
git diff --stagedgit diff --staged shows what your commit will containShows the changes that are staged and will go into your next commit.26 Jul 2026 - Tip
git add -pStage only part of a file with git add -pLets you choose which parts of a file go into the next commit.18 Jul 2026 - Tip
git restore --staged notes.txtUnstage a file with git restore --stagedTakes a file out of the staging area while keeping your edits on disk.13 Jul 2026
Nothing matches.