Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| handy_git_commands [2023/09/13 14:47] – mgupton | handy_git_commands [2024/12/04 14:57] (current) – mgupton | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| Show names of files that changed between last commit and the working directory. | Show names of files that changed between last commit and the working directory. | ||
| <code bash> | <code bash> | ||
| - | git diff --name-only | + | git diff --name-only |
| </ | </ | ||
| Show names of files that changed between the last two commits. | 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> | ||
| + | </ | ||