Crates.io | git-point |
lib.rs | git-point |
version | 0.2.2 |
source | src |
created_at | 2024-05-28 06:40:08.969376 |
updated_at | 2024-08-02 18:17:12.032784 |
description | Set arbitrary refs without shooting yourself in the foot, a porcelain `git update-ref` |
homepage | |
repository | https://github.com/Qyriad/git-point |
max_upload_size | |
id | 1254061 |
size | 7,310,234 |
git update-ref
Usage: git-point [OPTIONS] <FROM> <TO>
Arguments:
<FROM>
ref to update
<TO>
revision to point <FROM> to
Options:
-n, --new <KIND>
create a new ref of <KIND> instead of updating an existing one
Possible values:
- tag: New lightweight tag in refs/tags/<FROM>
- branch: New branch refs/heads/<FROM>
- remote-branch: refs/remotes/<FROM> (e.g. refs/remotes/origin/main)
- raw: No prefix, interpreted literally (like update-ref, be careful!)
-W, --allow-worktree
Allow mutating checked out refs. This will *not* change any of the actual files in the worktree
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
git-point is a single command to change what commit a ref points to — a porcelain alternative to git update-ref
, which is easy to misuse, makes no distinction between updating and creating refs, checked out refs versus not, and logs nothing.
git-point:
<FROM>
argument to resolve to exactly one unambiguous and existing ref, or for you to intentionally specify creation with --new
<TO>
argument to exactly one unambiguous and existing commit<FROM>
and <TO>
to be abbreviated (e.g., v2.3
instead of refs/tags/v2.3
)git point v2.3 'HEAD^{/version bump: 2.3}'
to your heart's contentIf you have a Nix implementation, you may use git-point without installing, for example with flakes:
$ nix run 'github:Qyriad/git-point' -- some-topic some-topic~3
# OR
$ nix shell 'github:Qyriad/git-point'
without flakes:
$ nix run --impure --expr 'import (fetchGit "https://github.com/Qyriad/git-point") { }' . -- some-topic some-topic~3
# OR
$ nix shell --impure 'import (fetchGit "https://github.com/Qyriad/git-point") { }'
[nix-shell]$ git-point some-topic some-topic~3
with nix-shell
:
$ nix-shell --expr 'import (fetchGit "https://github.com/Qyriad/git-point") { }'
git-point is written in Rust, and thus may be installed with Cargo:
$ cargo install git-point
Though note that this will not install the man page for git-point.
You can generate it yourself with git point --mangen
, which will output the man page to stdout.
If you wish to install it, you could do something like:
$ git point --mangen > /usr/local/share/man1/git-point.1