All technological notes.
| Command | Description |
|---|---|
git status |
View modified/untracked files |
git add file_name |
Add a file to staging area |
git add . |
Add all file at the current path to staging area |
git rm file_name |
Remove a tracked file from repo and disk |
| Command | Description |
|---|---|
git restore file_name |
Discard changes in working directory, reset to the last committed version |
| Command | Current state | Description |
|---|---|---|
git diff --name-only |
unstaged | List the files that have not been staged |
git diff --name-only --cached |
Stage | List the names of files that have been staged |