Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| handy_git_commands [2022/09/01 14:01] – created mgupton | handy_git_commands [2024/12/04 14:57] (current) – mgupton | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Handy Git Commands ====== | ====== Handy Git Commands ====== | ||
| - | Show names of files that changed between | + | ====== See Changes ====== |
| + | Show names of files that changed between | ||
| <code bash> | <code bash> | ||
| - | git diff --name-only | + | git diff --name-only |
| </ | </ | ||
| - | Show names of files that changed between | + | Show names of files that changed between the last two commits. |
| <code bash> | <code bash> | ||
| - | git diff --name-only | + | git diff --name-only |
| </ | </ | ||
| + | === concise one-line log === | ||
| + | <code bash> | ||
| + | git log --date=iso --pretty=format:" | ||
| + | </ | ||
| + | |||
| + | ====== Orphaned/ | ||
| + | * Create an orphaned branch | ||
| + | * Delete all the files in the new branch to start fresh | ||
| + | * I think you have to at least do a commit to the branch before it can be pushed to a remote | ||
| + | < | ||
| + | git checkout --orphan < | ||
| + | git rm -rf . | ||
| + | git commit --allow-empty -m " | ||
| + | git push -u origin <branch name> | ||
| + | </ | ||