Rename binaries to be invoked as part of git

Signed-off-by: dzdidi <deniszalessky@gmail.com>
This commit is contained in:
dzdidi
2023-09-24 21:43:59 +02:00
parent fa89fe3234
commit e3b12cb380
2 changed files with 12 additions and 12 deletions

View File

@@ -31,17 +31,17 @@ NOTE: application home directory will be created in `~/.gitpear` - this may requ
All data will be persisted in application directory (default `~/.gitpear`). To change it. Provide environment variable `GIT_PEAR` All data will be persisted in application directory (default `~/.gitpear`). To change it. Provide environment variable `GIT_PEAR`
* `gitpear daemon <-s, --start | -k, --stop>` - start or stop daemon * `git pear daemon <-s, --start | -k, --stop>` - start or stop daemon
* `gitpear key` - print out public key. Share it with your peers so that they can do `git pull pear:<public key>/<repo name>` * `git pear key` - print out public key. Share it with your peers so that they can do `git pull pear:<public key>/<repo name>`
* `gitpear init [-s, --share] <path>` - It will create [bare repository](https://git-scm.com/docs/git-init#Documentation/git-init.txt---bare) of the same name in application directory (default ~/.gitpear/<repository name>). It will add [git remote](https://git-scm.com/docs/git-remote) in current repository with name `pear`. So just like in traditional flow doing `git push orign`, here we do `git push pear`. By default repository will not be shared. To enable sharing provide `-s` or call `gitpear share <path>` later * `git pear init [-s, --share] <path>` - It will create [bare repository](https://git-scm.com/docs/git-init#Documentation/git-init.txt---bare) of the same name in application directory (default ~/.gitpear/<repository name>). It will add [git remote](https://git-scm.com/docs/git-remote) in current repository with name `pear`. So just like in traditional flow doing `git push orign`, here we do `git push pear`. By default repository will not be shared. To enable sharing provide `-s` or call `gitpear share <path>` later
* `gitpear share <path>` - makes repository sharable * `git pear share <path>` - makes repository sharable
* `gitpear unshare <path>` - stop sharing repository * `git pear unshare <path>` - stop sharing repository
* `gitpear list [-s, --shared]` - list all or (only shared) repositories * `git pear list [-s, --shared]` - list all or (only shared) repositories
## Usage example ## Usage example
@@ -53,8 +53,8 @@ Collaboration is possible however with the following flow between Alice and Bob
2. Alice steps are: 2. Alice steps are:
``` ```
cd Repo cd Repo
gitpear init -s git pear init -s
gitpear list git pear list
# outputs: # outputs:
# Repo pear://<Alice public key>/Repo # Repo pear://<Alice public key>/Repo
``` ```
@@ -63,12 +63,12 @@ gitpear list
``` ```
git clone pear://<Alice public key>/Repo git clone pear://<Alice public key>/Repo
cd Repo cd Repo
gitpear init -s git pear init -s
git checkout -b feature git checkout -b feature
# implement feature # implement feature
git commit -m 'done' git commit -m 'done'
git push pear feature git push pear feature
gitpear list git pear list
# outputs: # outputs:
# Repo pear://<Bob public key>/Repo # Repo pear://<Bob public key>/Repo
``` ```

View File

@@ -10,9 +10,9 @@
"pretest": "tar xzf test_home.tar.gz -C . " "pretest": "tar xzf test_home.tar.gz -C . "
}, },
"bin": { "bin": {
"gitpeard": "./src/gitpeard.js", "git-peard": "./src/gitpeard.js",
"git-remote-pear": "./src/git-remote-pear.js", "git-remote-pear": "./src/git-remote-pear.js",
"gitpear": "./src/cli.js" "git-pear": "./src/cli.js"
}, },
"repository": { "repository": {
"type": "git", "type": "git",