mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-19 21:35:57 +02:00
git*: refresh pages (#16372)
Co-authored-by: Juri Dispan <juri.dispan@posteo.net> Co-authored-by: CleanMachine1 <78213164+CleanMachine1@users.noreply.github.com> Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
This commit is contained in:
parent
28c1dec9b2
commit
0e8893e1ba
36 changed files with 73 additions and 73 deletions
|
@ -2,11 +2,11 @@
|
|||
|
||||
> Generate a list of committers of a Git repository.
|
||||
> Part of `git-extras`.
|
||||
> More information: <https://github.com/tj/git-extras/blob/master/Commands.md#git-authors>.
|
||||
> More information: <https://manned.org/git-authors>.
|
||||
|
||||
- Print a full list of committers to `stdout` instead of to the `AUTHORS` file:
|
||||
|
||||
`git authors --list`
|
||||
`git authors {{[-l|--list]}}`
|
||||
|
||||
- Append the list of committers to the `AUTHORS` file and open it in the default editor:
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
> Generate a changelog report from repository commits and tags.
|
||||
> Part of `git-extras`.
|
||||
> More information: <https://github.com/tj/git-extras/blob/master/Commands.md#git-changelog>.
|
||||
> More information: <https://manned.org/git-changelog>.
|
||||
|
||||
- Update existing file or create a new `History.md` file with the commit messages since the latest Git tag:
|
||||
|
||||
|
@ -10,19 +10,19 @@
|
|||
|
||||
- List commits from the current version:
|
||||
|
||||
`git changelog --list`
|
||||
`git changelog {{[-l|--list]}}`
|
||||
|
||||
- List a range of commits from the tag named `2.1.0` to now:
|
||||
|
||||
`git changelog --list --start-tag {{2.1.0}}`
|
||||
`git changelog {{[-l|--list]}} {{[-s|--start-tag]}} {{2.1.0}}`
|
||||
|
||||
- List pretty formatted range of commits between the tag `0.5.0` and the tag `1.0.0`:
|
||||
|
||||
`git changelog --start-tag {{0.5.0}} --final-tag {{1.0.0}}`
|
||||
`git changelog {{[-s|--start-tag]}} {{0.5.0}} {{[-f|--final-tag]}} {{1.0.0}}`
|
||||
|
||||
- List pretty formatted range of commits between the commit `0b97430` and the tag `1.0.0`:
|
||||
|
||||
`git changelog --start-commit {{0b97430}} --final-tag {{1.0.0}}`
|
||||
`git changelog --start-commit {{0b97430}} {{[-f|--final-tag]}} {{1.0.0}}`
|
||||
|
||||
- Specify `CHANGELOG.md` as the output file:
|
||||
|
||||
|
@ -30,4 +30,4 @@
|
|||
|
||||
- Replace contents of current changelog file entirely:
|
||||
|
||||
`git changelog --prune-old`
|
||||
`git changelog {{[-p|--prune-old]}}`
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
- Check the values of all attributes on a file:
|
||||
|
||||
`git check-attr --all {{path/to/file}}`
|
||||
`git check-attr {{[-a|--all]}} {{path/to/file}}`
|
||||
|
||||
- Check the value of a specific attribute on a file:
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
|||
|
||||
- Check the values of all attributes on specific files:
|
||||
|
||||
`git check-attr --all {{path/to/file1 path/to/file2 ...}}`
|
||||
`git check-attr {{[-a|--all]}} {{path/to/file1 path/to/file2 ...}}`
|
||||
|
||||
- Check the value of a specific attribute on one or more files:
|
||||
|
||||
|
|
|
@ -21,4 +21,4 @@
|
|||
|
||||
- Include details about the matching pattern for each path:
|
||||
|
||||
`git check-ignore --verbose {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}`
|
||||
`git check-ignore {{[-v|--verbose]}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}`
|
||||
|
|
|
@ -18,4 +18,4 @@
|
|||
|
||||
- Add the changes of a commit to the working directory, without creating a commit:
|
||||
|
||||
`git cherry-pick --no-commit {{commit}}`
|
||||
`git cherry-pick {{[-n|--no-commit]}} {{commit}}`
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
|
||||
- Open the Git repository at mentioned path:
|
||||
|
||||
`git cola --repo {{path/to/git-repository}}`
|
||||
`git cola {{[-r|--repo]}} {{path/to/git-repository}}`
|
||||
|
||||
- Apply the path filter to the status widget:
|
||||
|
||||
`git cola --status-filter {{filter}}`
|
||||
`git cola {{[-s|--status-filter]}} {{filter}}`
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
- Create a GPG-signed commit object:
|
||||
|
||||
`git commit-tree {{tree}} -m "{{message}}" --gpg-sign`
|
||||
`git commit-tree {{tree}} -m "{{message}}" {{[-S|--gpg-sign]}}`
|
||||
|
||||
- Create a commit object with the specified parent commit object:
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
- List local, global or system configuration entries and show their file location:
|
||||
|
||||
`git config --list --{{local|global|system}} --show-origin`
|
||||
`git config {{[-l|--list]}} --{{local|global|system}} --show-origin`
|
||||
|
||||
- Set the global value of a given configuration entry (in this case an alias):
|
||||
|
||||
|
@ -30,8 +30,8 @@
|
|||
|
||||
- Edit the local Git configuration (`.git/config`) in the default editor:
|
||||
|
||||
`git config --edit`
|
||||
`git config {{[-e|--edit]}}`
|
||||
|
||||
- Edit the global Git configuration (`~/.gitconfig` by default or `$XDG_CONFIG_HOME/git/config` if such a file exists) in the default editor:
|
||||
|
||||
`git config --global --edit`
|
||||
`git config --global {{[-e|--edit]}}`
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
|
||||
- Display a count of all objects and their total disk usage, displaying sizes in human-readable units:
|
||||
|
||||
`git count-objects --human-readable`
|
||||
`git count-objects {{[-H|--human-readable]}}`
|
||||
|
||||
- Display more verbose information:
|
||||
|
||||
`git count-objects --verbose`
|
||||
`git count-objects {{[-v|--verbose]}}`
|
||||
|
||||
- Display more verbose information, displaying sizes in human-readable units:
|
||||
|
||||
`git count-objects --human-readable --verbose`
|
||||
`git count-objects {{[-H|--human-readable]}} {{[-v|--verbose]}}`
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# git extras
|
||||
|
||||
> Git extension pack.
|
||||
> More information: <https://github.com/tj/git-extras>.
|
||||
> More information: <https://manned.org/git-extras>.
|
||||
|
||||
- Install or upgrade `git-extras` commands:
|
||||
|
||||
|
@ -9,8 +9,8 @@
|
|||
|
||||
- Display help:
|
||||
|
||||
`git extras --help`
|
||||
`git extras {{[-h|--help]}}`
|
||||
|
||||
- Display version:
|
||||
|
||||
`git extras --version`
|
||||
`git extras {{[-v|--version]}}`
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
> Create or merge feature branches.
|
||||
> Feature branches obey the format feature/name.
|
||||
> More information: <https://github.com/tj/git-extras/blob/master/Commands.md#git-feature>.
|
||||
> More information: <http://manned.org/git-feature>.
|
||||
|
||||
- Create and switch to a new feature branch:
|
||||
|
||||
|
@ -18,4 +18,4 @@
|
|||
|
||||
- Send changes from a specific feature branch to its remote counterpart:
|
||||
|
||||
`git feature {{feature_branch}} --remote {{remote_name}}`
|
||||
`git feature {{feature_branch}} {{[-r|--remote]}} {{remote_name}}`
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
- Run maintenance on each of a list of repositories stored in the `maintenance.repo` user configuration variable:
|
||||
|
||||
`git for-each-repo --config={{maintenance.repo}} {{maintenance run}}`
|
||||
`git for-each-repo --config maintenance.repo {{maintenance run}}`
|
||||
|
||||
- Run `git pull` on each repository listed in a global configuration variable:
|
||||
|
||||
`git for-each-repo --config={{global_configuration_variable}} {{pull}}`
|
||||
`git for-each-repo --config {{global_configuration_variable}} {{pull}}`
|
||||
|
|
|
@ -12,6 +12,6 @@
|
|||
|
||||
`git format-patch {{revision_1}}..{{revision_2}}`
|
||||
|
||||
- Write a `.patch` file for the 3 latest commits:
|
||||
- Write a `.patch` file for the `n` latest commits:
|
||||
|
||||
`git format-patch -{{3}}`
|
||||
`git format-patch -{{n}}`
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
> Show total blame count for files with unstaged changes or calculate the change in blame between two revisions.
|
||||
> Part of `git-extras`.
|
||||
> More information: <https://github.com/tj/git-extras/blob/master/Commands.md#git-guilt>.
|
||||
> More information: <https://manned.org/git-guilt>.
|
||||
|
||||
- Show total blame count:
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
|||
|
||||
- Find blame delta over the last three weeks:
|
||||
|
||||
`git guilt 'git log --until="3 weeks ago" --format="%H" {{[-n|--max-count]}} 1'`
|
||||
`git guilt 'git log --until "3 weeks ago" --format "%H" {{[-n|--max-count]}} 1'`
|
||||
|
||||
- Find blame delta over the last three weeks (git 1.8.5+):
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
> Display Git repository information.
|
||||
> Part of `git-extras`.
|
||||
> More information: <https://github.com/tj/git-extras/blob/master/Commands.md#git-info>.
|
||||
> More information: <https://manned.org/git-info>.
|
||||
|
||||
- Display remote locations, remote and local branches, most recent commit data and `.git/config` settings:
|
||||
|
||||
|
|
|
@ -9,19 +9,19 @@
|
|||
|
||||
- Listen only on localhost:
|
||||
|
||||
`git instaweb --start --local`
|
||||
`git instaweb --start {{[-l|--local]}}`
|
||||
|
||||
- Listen on a specific port:
|
||||
|
||||
`git instaweb --start --port {{1234}}`
|
||||
`git instaweb --start {{[-p|--port]}} {{1234}}`
|
||||
|
||||
- Use a specified HTTP daemon:
|
||||
|
||||
`git instaweb --start --httpd {{lighttpd|apache2|mongoose|plackup|webrick}}`
|
||||
`git instaweb --start {{[-d|--httpd]}} {{lighttpd|apache2|mongoose|plackup|webrick}}`
|
||||
|
||||
- Also auto-launch a web browser:
|
||||
|
||||
`git instaweb --start --browser`
|
||||
`git instaweb --start {{[-b|--browser]}}`
|
||||
|
||||
- Stop the currently running GitWeb server:
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# git lfs
|
||||
|
||||
> Work with large files in Git repositories.
|
||||
> More information: <https://git-lfs.com>.
|
||||
> More information: <https://github.com/git-lfs/git-lfs/tree/main/docs>.
|
||||
|
||||
- Initialize Git LFS:
|
||||
|
||||
|
|
|
@ -5,16 +5,16 @@
|
|||
|
||||
- Show deleted files:
|
||||
|
||||
`git ls-files --deleted`
|
||||
`git ls-files {{[-d|--deleted]}}`
|
||||
|
||||
- Show modified and deleted files:
|
||||
|
||||
`git ls-files --modified`
|
||||
`git ls-files {{[-m|--modified]}}`
|
||||
|
||||
- Show ignored and untracked files:
|
||||
|
||||
`git ls-files --others`
|
||||
`git ls-files {{[-o|--others]}}`
|
||||
|
||||
- Show untracked files, not ignored:
|
||||
|
||||
`git ls-files --others --exclude-standard`
|
||||
`git ls-files {{[-o|--others]}} --exclude-standard`
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
- Print all best common ancestors of two commits:
|
||||
|
||||
`git merge-base --all {{commit_1}} {{commit_2}}`
|
||||
`git merge-base {{[-a|--all]}} {{commit_1}} {{commit_2}}`
|
||||
|
||||
- Check if a commit is an ancestor of a specific commit:
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
- Edit the merge message:
|
||||
|
||||
`git merge --edit {{branch_name}}`
|
||||
`git merge {{[-e|--edit]}} {{branch_name}}`
|
||||
|
||||
- Merge a branch and create a merge commit:
|
||||
|
||||
|
@ -21,4 +21,4 @@
|
|||
|
||||
- Merge using a specific strategy:
|
||||
|
||||
`git merge --strategy {{strategy}} --strategy-option {{strategy_option}} {{branch_name}}`
|
||||
`git merge {{[-s|--strategy]}} {{strategy}} {{[-X|--strategy-option]}} {{strategy_option}} {{branch_name}}`
|
||||
|
|
|
@ -13,15 +13,15 @@
|
|||
|
||||
- Launch the merge tool identified by a name:
|
||||
|
||||
`git mergetool --tool {{tool_name}}`
|
||||
`git mergetool {{[-t|--tool]}} {{tool_name}}`
|
||||
|
||||
- Don't prompt before each invocation of the merge tool:
|
||||
|
||||
`git mergetool --no-prompt`
|
||||
`git mergetool {{[-y|--no-prompt]}}`
|
||||
|
||||
- Explicitly use the GUI merge tool (see the `merge.guitool` configuration variable):
|
||||
|
||||
`git mergetool --gui`
|
||||
`git mergetool {{[-g|--gui]}}`
|
||||
|
||||
- Explicitly use the regular merge tool (see the `merge.tool` configuration variable):
|
||||
|
||||
|
|
|
@ -13,4 +13,4 @@
|
|||
|
||||
- Overwrite the file or directory in the target path if it exists:
|
||||
|
||||
`git mv --force {{path/to/file_or_directory}} {{path/to/destination}}`
|
||||
`git mv {{[-f|--force]}} {{path/to/file_or_directory}} {{path/to/destination}}`
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
|
||||
- Report what would be removed by Git prune without removing it:
|
||||
|
||||
`git prune --dry-run`
|
||||
`git prune {{[-n|--dry-run]}}`
|
||||
|
||||
- Prune unreachable objects and display what has been pruned to `stdout`:
|
||||
|
||||
`git prune --verbose`
|
||||
`git prune {{[-v|--verbose]}}`
|
||||
|
||||
- Prune unreachable objects while showing progress:
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
> Rebase a branch on top of another using a merge commit and only one conflict handling.
|
||||
> Part of `git-extras`.
|
||||
> More information: <https://github.com/tj/git-extras/blob/master/Commands.md#git-psykorebase>.
|
||||
> More information: <https://manned.org/git-psykorebase>.
|
||||
|
||||
- Rebase the current branch on top of another using a merge commit and only one conflict handling:
|
||||
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
|
||||
- Change an author's email and name across the whole Git repository:
|
||||
|
||||
`git reauthor --old-email {{old@example.com}} --correct-email {{new@example.com}} --correct-name "{{name}}"`
|
||||
`git reauthor {{[-o|--old-email]}} {{old@example.com}} {{[-e|--correct-email]}} {{new@example.com}} {{[-n|--correct-name]}} "{{name}}"`
|
||||
|
||||
- Change the email and name to the ones defined in the Git config:
|
||||
|
||||
`git reauthor --old-email {{old@example.com}} --use-config`
|
||||
`git reauthor {{[-o|--old-email]}} {{old@example.com}} {{[-c|--use-config]}}`
|
||||
|
||||
- Change the email and name of all commits, regardless of their original author:
|
||||
|
||||
`git reauthor --all --correct-email {{name@example.com}} --correct-name {{name}}`
|
||||
`git reauthor {{[-a|--all]}} {{[-e|--correct-email]}} {{name@example.com}} {{[-n|--correct-name]}} {{name}}`
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
> Create a Git tag for a release.
|
||||
> Part of `git-extras`.
|
||||
> More information: <https://github.com/tj/git-extras/blob/master/Commands.md#git-release>.
|
||||
> More information: <https://manned.org/git-release>.
|
||||
|
||||
- Create and push a release:
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
- Interactively unstage portions of a file:
|
||||
|
||||
`git reset --patch {{path/to/file}}`
|
||||
`git reset {{[-p|--patch]}} {{path/to/file}}`
|
||||
|
||||
- Undo the last commit, keeping its changes (and any further uncommitted changes) in the filesystem:
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
- Restore an unstaged file to the version of a specific commit:
|
||||
|
||||
`git restore --source {{commit}} {{path/to/file}}`
|
||||
`git restore {{[-s|--source]}} {{commit}} {{path/to/file}}`
|
||||
|
||||
- Discard all unstaged changes to tracked files:
|
||||
|
||||
|
@ -18,16 +18,16 @@
|
|||
|
||||
- Unstage a file:
|
||||
|
||||
`git restore --staged {{path/to/file}}`
|
||||
`git restore {{[-S|--staged]}} {{path/to/file}}`
|
||||
|
||||
- Unstage all files:
|
||||
|
||||
`git restore --staged :/`
|
||||
`git restore {{[-S|--staged]}} :/`
|
||||
|
||||
- Discard all changes to files, both staged and unstaged:
|
||||
|
||||
`git restore --worktree --staged :/`
|
||||
`git restore {{[-W|--worktree]}} {{[-S|--staged]}} :/`
|
||||
|
||||
- Interactively select sections of files to restore:
|
||||
|
||||
`git restore --patch`
|
||||
`git restore {{[-p|--patch]}}`
|
||||
|
|
|
@ -9,4 +9,4 @@
|
|||
|
||||
- Specify the hash algorithm for the index file (experimental):
|
||||
|
||||
`git show-index --object-format={{sha1|sha256}} {{path/to/file}}`
|
||||
`git show-index --object-format {{sha1|sha256}} {{path/to/file}}`
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
> Squash multiple commits into a single commit.
|
||||
> Part of `git-extras`.
|
||||
> More information: <https://github.com/tj/git-extras/blob/master/Commands.md#git-squash>.
|
||||
> More information: <https://manned.org/git-squash>.
|
||||
|
||||
- Merge all commits from a specific branch into the current branch as a single commit:
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
> Stamp the last commit message, with the possibility to reference the issues numbers from your bug tracker or link to its review page.
|
||||
> Part of `git-extras`.
|
||||
> More information: <https://github.com/tj/git-extras/blob/master/Commands.md#git-stamp>.
|
||||
> More information: <https://manned.org/git-stamp>.
|
||||
|
||||
- Stamp the last commit message referencing it with the issue number from your bug tracker:
|
||||
|
||||
|
@ -14,4 +14,4 @@
|
|||
|
||||
- Stamp the last commit message replacing previous issues with a new one:
|
||||
|
||||
`git stamp --replace {{issue_number}}`
|
||||
`git stamp {{[-r|--replace]}} {{issue_number}}`
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
- Trim whitespace and Git comments from a file:
|
||||
|
||||
`cat {{path/to/file}} | git stripspace --strip-comments`
|
||||
`cat {{path/to/file}} | git stripspace {{[-s|--strip-comments]}}`
|
||||
|
||||
- Convert all lines in a file into Git comments:
|
||||
|
||||
`git stripspace --comment-lines < {{path/to/file}}`
|
||||
`git stripspace {{[-c|--comment-lines]}} < {{path/to/file}}`
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
> Display information about a Git repository.
|
||||
> Part of `git-extras`.
|
||||
> More information: <https://github.com/tj/git-extras/blob/master/Commands.md#git-summary>.
|
||||
> More information: <https://manned.org/git-summary>.
|
||||
|
||||
- Display data about a Git repository:
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
- Verify a packed Git archive file and show verbose details:
|
||||
|
||||
`git verify-pack --verbose {{path/to/pack-file}}`
|
||||
`git verify-pack {{[-v|--verbose]}} {{path/to/pack-file}}`
|
||||
|
||||
- Verify a packed Git archive file and only display the statistics:
|
||||
|
||||
`git verify-pack --stat-only {{path/to/pack-file}}`
|
||||
`git verify-pack {{[-s|--stat-only]}} {{path/to/pack-file}}`
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
- Check tags for a GPG signature and show details for each tag:
|
||||
|
||||
`git verify-tag {{tag1 optional_tag2 ...}} --verbose`
|
||||
`git verify-tag {{tag1 optional_tag2 ...}} {{[-v|--verbose]}}`
|
||||
|
||||
- Check tags for a GPG signature and print the raw details:
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
- Display logs and changes for recent commits within the specified time frame:
|
||||
|
||||
`git whatchanged --since="{{2 hours ago}}"`
|
||||
`git whatchanged --since "{{2 hours ago}}"`
|
||||
|
||||
- Display logs and changes for recent commits for specific files or directories:
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue