ok/jj
1
0
Fork 0
forked from mirrors/jj

docs: update basic workflow to use autogenned branch name

This commit is contained in:
Hong Shin 2023-09-25 17:06:50 -07:00 committed by honglooker
parent 0c0b924e7a
commit e5ad32e29e

View file

@ -11,8 +11,7 @@ authenticated http.
## Basic workflow ## Basic workflow
The simplest way to start with Jujutsu, is creating a stack of commits, before The simplest way to start with Jujutsu is by creating a stack of commits and letting Jujutsu auto-create a branch.
creating any branch.
```shell ```shell
# Start a new commit off of `main` # Start a new commit off of `main`
@ -21,10 +20,8 @@ $ jj new main
$ jj commit -m 'refactor(foo): restructure foo()' $ jj commit -m 'refactor(foo): restructure foo()'
# Add a feature, then add a description and start a new commit # Add a feature, then add a description and start a new commit
$ jj commit -m 'feat(bar): add support for bar' $ jj commit -m 'feat(bar): add support for bar'
# Create a branch so we can push it to GitHub # Let Jujutsu generate a branch name and push that to GitHub
$ jj branch create bar -r @- $ jj git push -c @-
# Push the branch to GitHub (pushes only `bar`)
$ jj git push
``` ```
While it's possible to create a branch and commit on top of it in a Git like While it's possible to create a branch and commit on top of it in a Git like