mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-11 10:35:57 +03:00
# Conflicts: # unison-cli-integration/integration-tests/IntegrationTests/transcript.output.md # unison-src/transcripts-round-trip/main.output.md # unison-src/transcripts/add-run.output.md # unison-src/transcripts/bug-strange-closure.output.md # unison-src/transcripts/cycle-update-5.output.md # unison-src/transcripts/delete.output.md # unison-src/transcripts/diff-namespace.output.md # unison-src/transcripts/move-namespace.output.md # unison-src/transcripts/name-selection.output.md # unison-src/transcripts/names.output.md # unison-src/transcripts/namespace-dependencies.output.md # unison-src/transcripts/propagate.output.md # unison-src/transcripts/reflog.output.md # unison-src/transcripts/reset.output.md # unison-src/transcripts/tab-completion.output.md # unison-src/transcripts/transcript-parser-commands.output.md
73 lines
1.5 KiB
Markdown
73 lines
1.5 KiB
Markdown
Deleting the branch you are on takes you to its parent (though this is impossible to see in a transcript, since we set
|
|
your working directory with each command).
|
|
|
|
``` ucm
|
|
foo/main> branch topic
|
|
|
|
Done. I've created the topic branch based off of main.
|
|
|
|
Tip: To merge your work back into the main branch, first
|
|
`switch /main` then `merge /topic`.
|
|
|
|
foo/topic> delete.branch /topic
|
|
|
|
```
|
|
A branch need not be preceded by a forward slash.
|
|
|
|
``` ucm
|
|
foo/main> branch topic
|
|
|
|
Done. I've created the topic branch based off of main.
|
|
|
|
Tip: To merge your work back into the main branch, first
|
|
`switch /main` then `merge /topic`.
|
|
|
|
foo/topic> delete.branch topic
|
|
|
|
```
|
|
You can precede the branch name by a project name.
|
|
|
|
``` ucm
|
|
foo/main> branch topic
|
|
|
|
Done. I've created the topic branch based off of main.
|
|
|
|
Tip: To merge your work back into the main branch, first
|
|
`switch /main` then `merge /topic`.
|
|
|
|
scratch/main> delete.branch foo/topic
|
|
|
|
```
|
|
You can delete the only branch in a project.
|
|
|
|
``` ucm
|
|
foo/main> delete.branch /main
|
|
|
|
```
|
|
You can delete the last branch in the project, a new one will be created.
|
|
|
|
``` ucm
|
|
scratch/main> delete.branch scratch/main
|
|
|
|
scratch/main> branches
|
|
|
|
Branch Remote branch
|
|
1. main
|
|
2. main2
|
|
|
|
```
|
|
If the the last branch isn't /main, then /main will be created.
|
|
|
|
``` ucm
|
|
scratch/main2> delete.branch /main
|
|
|
|
scratch/main2> delete.branch /main2
|
|
|
|
scratch/other> branches
|
|
|
|
Branch Remote branch
|
|
1. main
|
|
2. other
|
|
|
|
```
|