-
Couldn't load subscription status.
- Fork 1
Push
When working with a clone, you add commands into local branches. These extra commands cannot be merged directly into the branches that were obtained from the upstream store. To do that, you have to use the push command.
^work[4]> push
To push 2 commands in 1 branch
Push [0,1] from /steve/work/+
Push completed
^work[4]>
The push command sends all changes in your local store to the upstream. This modifies the upstream store by ensuring that it contains all the command data that is present in the downstream store. The local (downstream) store remains unchanged.
Exit from altcmd and re-open the upstream store.
^[5]> exit
C:Alt\> altcmd origin
Opened origin (current branch is origin)
[4]> ls -a
* /origin
/origin/work
_/origin/work/steve (ahead of parent by 1)
8 commands in 2 local branches
2 commands in 1 remote branch
The upstream store now shows the new branch that was created downstream. You can identify downstream branches because they are preceded with an underscore character. Downstream branches are regarded as remote branches, so they are read-only. You can browse the content of any remote branch by switching to them with a cd (checkout) command. But you cannot change them.
Downstream branches that were explicitly created will retain the same name when they are pushed upstream. But automatically created branches (called +) will be renamed to match the name of the downstream store. If new command data is incoming from many different downstream stores, this convention helps to show where the commands are coming from.
Altcmd makes no attempt to immediately merge command data that has been pushed from a remote. Instead, the new data has to be consciously merged, much like a pull request in git.
[4]> cd work
work[4]> merge steve
work[5]> ls -a
/origin
* /origin/work (ahead of parent by 1)
_/origin/work/steve
If you use the recall --all command, you will now see the extra name that had been added in the 'steve' branch is now known to /origin/work.
Notice too that the "ahead of parent" message has moved up to the /origin/work branch. This just means that the root branch still does not know about the extra name was added in the downstream store.
