Scenario: uncommitted-changes
The splice's folder has a committed change and an uncommitted one. Like
every command, push reads the splice from the last commit, so it sends
only the committed change.
- Monorepo (
vendor/a/): cloned atseed, then a local commit, then an edit tofile.txtthat isn't committed. - Upstream:
seed, unchanged.
Output
setup.bash builds this state:
$ build_scenario scenario_uncommitted_changes
status shows the committed change, and warns about the uncommitted one:
$ git splice status
On branch main
ahead 1 vendor/a uncommitted changes
push warns too, and sends what is committed:
$ git splice push vendor/a
?? vendor/a: uncommitted changes aren't pushed -- commit them first
ok vendor/a: pushed e859a6b to main
The upstream now matches the last commit, but the edit is still only in the folder:
$ git splice status
On branch main
up to date vendor/a uncommitted changes
Committing it makes it pushable:
$ git commit -q -am "uncommitted change" && git splice push vendor/a
ok vendor/a: pushed 76bcc31 to main
$ git splice status
On branch main
up to date vendor/a