Skip to content

Commit

Permalink
Rename init command to init-repository
Browse files Browse the repository at this point in the history
  • Loading branch information
extsoft committed Jul 25, 2019
1 parent 3d74a61 commit d3b357e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
18 changes: 14 additions & 4 deletions docs/commands.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
`git elegant <command>` where `<command>` is one of

- `clone-repository`
- `init-repository`
- `start-work`
- `save-work`
- `deliver-work`
- `accept-work`
- `pull`
- `init`
- `add`
- `clear-local`
- `configure-repository`
Expand All @@ -25,6 +25,19 @@ cd <repo root directory>
# execute commands provided by `git elegant configure-repository`
```

# `init-repository`
Creates an empty Git repository (or reinitialize an existing one) and runs its configuration.

```bash
usage: git elegant init-repository
```

A sequence of original `git` commands:
```bash
git init
# execute commands provided by `git elegant configure-repository`
```

# `start-work`
Creates a new local branch based on latest version of `master`. If there are some uncommitted
changes, they will be moved to the new branch.
Expand Down Expand Up @@ -92,9 +105,6 @@ git push origin --delete <remote-branch-name>
# `pull`
Downloads new updates for a local branch.

# `init`
Creates an empty Git repository or reinitialize an existing one. Then runs local repository configuration.

# `add`
Adds file contents to the index interactively.

Expand Down
2 changes: 1 addition & 1 deletion libexec/git-elegant-commands
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ set -e

default() {
echo "clone-repository"
echo "init-repository"
echo "start-work"
echo "save-work"
echo "deliver-work"
echo "accept-work"
echo "pull"
echo "init"
echo "add"
echo "clear-local"
echo "configure-repository"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/git-elegant-commands.bats
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ teardown() {
@test "'commands': print all available commands" {
COMMANDS=(
"clone-repository"
"init-repository"
"start-work"
"save-work"
"deliver-work"
"accept-work"
"pull"
"init"
"add"
"clear-local"
"configure-repository"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ teardown() {
clean-fake
}

@test "'init': command is available" {
check git-elegant init
@test "'init-repository': command is available" {
check git-elegant init-repository
[ "$status" -eq 0 ]
}

0 comments on commit d3b357e

Please sign in to comment.