Git
Everyday Git commands.
less than a minute
Undo
| Task | Command |
|---|---|
| Unstage a file | git restore --staged <file> |
| Discard local changes | git restore <file> |
| Amend last commit | git commit --amend |
less than a minute
| Task | Command |
|---|---|
| Unstage a file | git restore --staged <file> |
| Discard local changes | git restore <file> |
| Amend last commit | git commit --amend |