# Git Cheat Sheet

URL: https://phishdestroy.io/developer-tools/git-cheat-sheet
Category: General dev
Where it runs: Runs locally (nothing you enter is uploaded)

Type a word such as branch, stash or undo to find the Git command you need, each with a one-line explanation.

## Example input

Undo a commit

```
undo
```

Two commands: git reset --hard HEAD~1, which drops the last commit and its changes, and git revert, which adds a new commit that reverses an earlier one.

## FAQ

### What does the search match?

The text you type is matched as one phrase, ignoring case, against both the command and its description, so undo finds git reset --hard and git revert. The list covers 38 common commands, not every option.

### Which commands can lose work?

git reset --hard throws away uncommitted changes and moves the branch back, and git clean -fd deletes untracked files and folders. Check git status first; git reflog can usually bring back commits, but not changes that were never committed.

### Does the page run Git or send anything?

No. It is a static list filtered in your browser; nothing is executed and nothing is uploaded.

## Related tools

- [.gitignore Templates](https://phishdestroy.io/developer-tools/gitignore-templates)
- [README Template Generator](https://phishdestroy.io/developer-tools/readme-template-generator)
- [Open Source License Picker](https://phishdestroy.io/developer-tools/open-source-license-picker)

All tools: https://phishdestroy.io/developer-tools
