More working commands
This commit is contained in:
@@ -11,7 +11,8 @@ A small command-line-like Git module for Racket, implemented directly on top of
|
||||
(git 'add "main.rkt" "info.rkt")
|
||||
(git 'commit "Implement raco support")
|
||||
(git 'tag "v0.2")
|
||||
(git 'checkout "main")
|
||||
(git 'branch-current)
|
||||
(git 'switch "main")
|
||||
|
||||
;; Display-oriented variant:
|
||||
(dgit 'status)
|
||||
@@ -20,7 +21,7 @@ A small command-line-like Git module for Racket, implemented directly on top of
|
||||
`git` is an ordinary procedure; command names are symbols. `dgit` performs the
|
||||
same operation, displays a compact human-readable result, and returns that result.
|
||||
|
||||
The same operations are available as normal procedures such as `git-status`, `git-add`, `git-commit`, `git-tag`, and `git-checkout`.
|
||||
The same operations are available as normal procedures such as `git-status`, `git-add`, `git-commit`, `git-tag`, `git-current-branch`, `git-switch`, and `git-checkout`.
|
||||
|
||||
## HTTPS credentials
|
||||
|
||||
@@ -90,7 +91,7 @@ operations use them automatically:
|
||||
## Supported Git operations
|
||||
|
||||
Version 0.2 supports repository discovery, init, clone, status, add, config,
|
||||
commit, branch, checkout, lightweight tags, log, remotes, fetch,
|
||||
commit, branch, branch-current, switch, checkout, lightweight tags, log, remotes, fetch,
|
||||
fast-forward-only pull, push, tag push, network transfer progress, and HTTPS username/token credentials.
|
||||
|
||||
SSH credentials, merge/rebase pull, annotated tags, and submodules are not yet
|
||||
@@ -101,3 +102,17 @@ Install from the package directory with:
|
||||
```sh
|
||||
raco pkg install .
|
||||
```
|
||||
|
||||
|
||||
## Recover a detached HEAD commit
|
||||
|
||||
```racket
|
||||
(git 'branch-current) ; #f
|
||||
(git 'branch-create "rescue-readme")
|
||||
(git 'switch "main")
|
||||
(git 'merge "rescue-readme")
|
||||
(git 'status)
|
||||
(dgit 'log 5)
|
||||
(git 'push)
|
||||
(git 'branch '-d "rescue-readme")
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user