diff --git a/pages/common/git-add.md b/pages/common/git-add.md index 15d6df3e48..9122aebf6c 100644 --- a/pages/common/git-add.md +++ b/pages/common/git-add.md @@ -9,7 +9,7 @@ - Add all files (tracked and untracked): -`git add -A` +`git add {{--all|-A}}` - Add all files in the current folder: @@ -17,20 +17,20 @@ - Only add already tracked files: -`git add -u` +`git add {{--update|-u}}` - Also add ignored files: -`git add -f` +`git add {{--force|-f}}` - Interactively stage parts of files: -`git add -p` +`git add {{--patch|-p}}` - Interactively stage parts of a given file: -`git add -p {{path/to/file}}` +`git add {{--patch|-p}} {{path/to/file}}` - Interactively stage a file: -`git add -i` +`git add {{--interactive|-i}}` diff --git a/pages/common/git-annotate.md b/pages/common/git-annotate.md index d3f03fa1da..dfcb249f4b 100644 --- a/pages/common/git-annotate.md +++ b/pages/common/git-annotate.md @@ -11,7 +11,7 @@ - Print a file with the author [e]mail and commit hash prepended to each line: -`git annotate -e {{path/to/file}}` +`git annotate {{--show-email|-e}} {{path/to/file}}` - Print only rows that match a regular expression: diff --git a/pages/common/git-archive.md b/pages/common/git-archive.md index b9065a7807..b68ca73866 100644 --- a/pages/common/git-archive.md +++ b/pages/common/git-archive.md @@ -5,24 +5,24 @@ - Create a tar archive from the contents of the current HEAD and print it to `stdout`: -`git archive --verbose HEAD` +`git archive {{--verbose|-v}} HEAD` - Use the Zip format and report progress verbosely: -`git archive {{-v|--verbose}} --format zip HEAD` +`git archive {{--verbose|-v}} --format zip HEAD` - Output the Zip archive to a specific file: -`git archive -v {{-o|--output}} {{path/to/file.zip}} HEAD` +`git archive {{--verbose|-v}} {{--output|-o}} {{path/to/file.zip}} HEAD` - Create a tar archive from the contents of the latest commit of a specific branch: -`git archive -o {{path/to/file.tar}} {{branch_name}}` +`git archive {{--output|-o}} {{path/to/file.tar}} {{branch_name}}` - Use the contents of a specific directory: -`git archive -o {{path/to/file.tar}} HEAD:{{path/to/directory}}` +`git archive {{--output|-o}} {{path/to/file.tar}} HEAD:{{path/to/directory}}` - Prepend a path to each file to archive it inside a specific directory: -`git archive -o {{path/to/file.tar}} --prefix {{path/to/prepend}}/ HEAD` +`git archive {{--output|-o}} {{path/to/file.tar}} --prefix {{path/to/prepend}}/ HEAD` diff --git a/pages/common/git-blame.md b/pages/common/git-blame.md index 47b19f8b48..f9239019e8 100644 --- a/pages/common/git-blame.md +++ b/pages/common/git-blame.md @@ -9,7 +9,7 @@ - Print file with author email and commit hash on each line: -`git blame -e {{path/to/file}}` +`git blame {{--show-email|-e}} {{path/to/file}}` - Print file with author name and commit hash on each line at a specific commit: diff --git a/pages/common/git-branch.md b/pages/common/git-branch.md index 6f49d81e38..779bbf3004 100644 --- a/pages/common/git-branch.md +++ b/pages/common/git-branch.md @@ -25,11 +25,11 @@ - Rename a branch (must not have it checked out to do this): -`git branch -m {{old_branch_name}} {{new_branch_name}}` +`git branch {{--move|-m}} {{old_branch_name}} {{new_branch_name}}` - Delete a local branch (must not have it checked out to do this): -`git branch -d {{branch_name}}` +`git branch {{--delete|-d}} {{branch_name}}` - Delete a remote branch: diff --git a/pages/common/git-bundle.md b/pages/common/git-bundle.md index 48ffed88ef..9929790961 100644 --- a/pages/common/git-bundle.md +++ b/pages/common/git-bundle.md @@ -17,7 +17,7 @@ - Create a bundle file of the latest 7 days: -`git bundle create {{path/to/file.bundle}} --since={{7.days}} {{HEAD}}` +`git bundle create {{path/to/file.bundle}} --since {{7.days}} {{HEAD}}` - Verify that a bundle file is valid and can be applied to the current repository: diff --git a/pages/common/git-cherry.md b/pages/common/git-cherry.md index 3c851a09b2..2430da7c15 100644 --- a/pages/common/git-cherry.md +++ b/pages/common/git-cherry.md @@ -5,7 +5,7 @@ - Show commits (and their messages) with equivalent commits upstream: -`git cherry -v` +`git cherry {{--verbose|-v}}` - Specify a different upstream and topic branch: diff --git a/pages/common/git-clean.md b/pages/common/git-clean.md index 7e2465448c..812748a603 100644 --- a/pages/common/git-clean.md +++ b/pages/common/git-clean.md @@ -9,19 +9,19 @@ - [i]nteractively delete untracked files: -`git clean -i` +`git clean {{--interactive|-i}}` - Show which files would be deleted without actually deleting them: `git clean --dry-run` -- [f]orcefully delete untracked files: +- Forcefully delete untracked files: -`git clean -f` +`git clean {{--force|-f}}` -- [f]orcefully delete untracked [d]irectories: +- Forcefully delete untracked [d]irectories: -`git clean -fd` +`git clean {{--force|-f}} -d` - Delete untracked files, including e[x]cluded files (files ignored in `.gitignore` and `.git/info/exclude`): diff --git a/pages/common/git-diff-tree.md b/pages/common/git-diff-tree.md index 6c234f86db..74a7f9a7f6 100644 --- a/pages/common/git-diff-tree.md +++ b/pages/common/git-diff-tree.md @@ -13,7 +13,7 @@ - Display changes in patch format: -`git diff-tree -p {{tree-ish1}} {{tree-ish2}}` +`git diff-tree {{--patch|-p}} {{tree-ish1}} {{tree-ish2}}` - Filter changes by a specific path: diff --git a/pages/common/git-lfs.md b/pages/common/git-lfs.md index d214313d51..4f263235a6 100644 --- a/pages/common/git-lfs.md +++ b/pages/common/git-lfs.md @@ -13,7 +13,7 @@ - Change the Git LFS endpoint URL (useful if the LFS server is separate from the Git server): -`git config -f .lfsconfig lfs.url {{lfs_endpoint_url}}` +`git config {{--file|-f}} .lfsconfig lfs.url {{lfs_endpoint_url}}` - List tracked patterns: diff --git a/pages/common/git-log.md b/pages/common/git-log.md index 569841e144..2c4c870d6d 100644 --- a/pages/common/git-log.md +++ b/pages/common/git-log.md @@ -9,7 +9,7 @@ - Show the history of a particular file or directory, including differences: -`git log -p {{path/to/file_or_directory}}` +`git log {{--patch|-p|-u}} {{path/to/file_or_directory}}` - Show an overview of which file(s) changed in each commit: @@ -23,14 +23,14 @@ `git log --oneline --decorate --all --graph` -- Show only commits whose messages include a given string (case-insensitively): +- Show only commits with messages that include a specific string, ignoring case: -`git log -i --grep {{search_string}}` +`git log {{--regexp-ignore-case|-i}} --grep {{search_string}}` -- Show the last N commits from a certain author: +- Show the last N number of commits from a certain author: -`git log -n {{number}} --author={{author}}` +`git log {{--max-count|-n} {{number}} --author "{{author}}"` - Show commits between two dates (yyyy-mm-dd): -`git log --before="{{2017-01-29}}" --after="{{2017-01-17}}"` +`git log --before "{{2017-01-29}}" --after "{{2017-01-17}}"` diff --git a/pages/common/git-rebase.md b/pages/common/git-rebase.md index 8b7d396c37..e8269e4aa0 100644 --- a/pages/common/git-rebase.md +++ b/pages/common/git-rebase.md @@ -10,7 +10,7 @@ - Start an interactive rebase, which allows the commits to be reordered, omitted, combined or modified: -`git rebase -i {{target_base_branch_or_commit_hash}}` +`git rebase {{--interactive|-i}} {{target_base_branch_or_commit_hash}}` - Continue a rebase that was interrupted by a merge failure, after editing conflicting files: @@ -30,8 +30,8 @@ - Reapply the last 5 commits in-place, stopping to allow them to be reordered, omitted, combined or modified: -`git rebase -i {{HEAD~5}}` +`git rebase {{--interactive|-i}} {{HEAD~5}}` - Auto-resolve any conflicts by favoring the working branch version (`theirs` keyword has reversed meaning in this case): -`git rebase -X theirs {{branch_name}}` +`git rebase {{--strategy-option|-X}} theirs {{branch_name}}` diff --git a/pages/common/git-reflog.md b/pages/common/git-reflog.md index e3d9867dad..265bda51e3 100644 --- a/pages/common/git-reflog.md +++ b/pages/common/git-reflog.md @@ -13,4 +13,4 @@ - Show only the 5 latest entries in the reflog: -`git reflog -n {{5}}` +`git reflog {{--dry-run|-n}} {{5}}` diff --git a/pages/common/git-remote.md b/pages/common/git-remote.md index 29ee5270e7..eef741271b 100644 --- a/pages/common/git-remote.md +++ b/pages/common/git-remote.md @@ -5,7 +5,7 @@ - List existing remotes with their names and URLs: -`git remote -v` +`git remote {{--verbose|-v}}` - Show information about a remote: diff --git a/pages/common/git-rev-list.md b/pages/common/git-rev-list.md index b8024aa3a4..5b78853cea 100644 --- a/pages/common/git-rev-list.md +++ b/pages/common/git-rev-list.md @@ -9,11 +9,11 @@ - Print the latest commit that changed (add/edit/remove) a specific file on the current branch: -`git rev-list -n 1 HEAD -- {{path/to/file}}` +`git rev-list {{--max-count|-n}} 1 HEAD -- {{path/to/file}}` - List commits more recent than a specific date, on a specific branch: -`git rev-list --since={{'2019-12-01 00:00:00'}} {{branch_name}}` +`git rev-list --since "{{2019-12-01 00:00:00}}" {{branch_name}}` - List all merge commits on a specific commit: diff --git a/pages/common/git-revert.md b/pages/common/git-revert.md index 4767bc3943..ec6448c621 100644 --- a/pages/common/git-revert.md +++ b/pages/common/git-revert.md @@ -21,4 +21,4 @@ - Don't create new commits, just change the working tree: -`git revert -n {{0c01a9..9a1743}}` +`git revert {{--no-commit|-n}} {{0c01a9..9a1743}}` diff --git a/pages/common/git-send-email.md b/pages/common/git-send-email.md index d550b506df..9777d425ef 100644 --- a/pages/common/git-send-email.md +++ b/pages/common/git-send-email.md @@ -4,7 +4,7 @@ > Patches can be specified as files, directions, or a revision list. > More information: . -- Send the last commit in the current branch: +- Send the last commit in the current branch interactively: `git send-email -1` diff --git a/pages/common/git-shortlog.md b/pages/common/git-shortlog.md index 2774f3348e..90819e61fd 100644 --- a/pages/common/git-shortlog.md +++ b/pages/common/git-shortlog.md @@ -9,11 +9,11 @@ - View a summary of all the commits made, sorted by the number of commits made: -`git shortlog -n` +`git shortlog {{--numbered|-n}}` - View a summary of all the commits made, grouped by the committer identities (name and email): -`git shortlog -c` +`git shortlog {{--committer|-c}}` - View a summary of the last 5 commits (i.e. specify a revision range): @@ -21,8 +21,8 @@ - View all users, emails and the number of commits in the current branch: -`git shortlog -sne` +`git shortlog {{--summary|-s}} {{--numbered|-n}} {{--email|-e}}` - View all users, emails and the number of commits in all branches: -`git shortlog -sne --all` +`git shortlog {{--summary|-s}} {{--numbered|-n}} {{--email|-e}} --all` diff --git a/pages/common/git-svn.md b/pages/common/git-svn.md index 7fbae8f1fb..f94fc46831 100644 --- a/pages/common/git-svn.md +++ b/pages/common/git-svn.md @@ -9,7 +9,7 @@ - Clone an SVN repository starting at a given revision number: -`git svn clone -r{{1234}}:HEAD {{https://svn.example.net/subversion/repo}} {{local_dir}}` +`git svn clone {{--revision|-r}} {{1234}}:HEAD {{https://svn.example.net/subversion/repo}} {{local_dir}}` - Update local clone from the remote SVN repository: diff --git a/pages/common/git-tag.md b/pages/common/git-tag.md index eff87c349c..1d071ddd5b 100644 --- a/pages/common/git-tag.md +++ b/pages/common/git-tag.md @@ -22,7 +22,7 @@ - Delete the tag with the given name: -`git tag -d {{tag_name}}` +`git tag {{--delete|-d}} {{tag_name}}` - Get updated tags from remote: