Slackbot
04/10/2023, 7:01 PMmarcos
04/10/2023, 7:01 PMgt branch track
Then as I go about changing things on each branch and rewriting history, they get out of sync with each other.
But I can get them chained again using
gt upstack restack
I'm still wrapping my head around the up
and down
parts.
My intuition is backwards of the analogy, thinking up
is old and down
is new.
But the stack
analogy is that the bottom/`down` is the origin and new branches are stacked up
on top.
So upstack
means child branches.
and downstack
(which I haven't used on the CLI) means parent branches.
[edit] documentation explanation of `up`/`down`:
Upstack: Branches further away fromin a stack (more recent; descendants; recursive children). Commands within the "upstack" noun operate on a branch and descendants.main
Downstack: Branches closer tovia https://graphite.dev/docs/familiarizing-yourself-with-gtin a stack (less recent; ancestors; recursive parents). Commands within the "downstack" noun operate on a branch and its ancestors.main
Nikolaus
04/10/2023, 7:51 PMgt --help
gt upstack <command> Commands that operate on a branch and its descendants.
gt downstack <command> Commands that operate on a branch and its ancestors.
Normally "descendants" go downward, and in a normal family tree picture the ancestors go upward.
I don't suppose there's a config flag to switch the direction? 😉marcos
04/10/2023, 11:07 PMgt log
and I love the output.
Normally, I git switch
branch by branch and do a git log --oneline develop..mybranch
which shows me pretty clean output.
But gt log
does it for me for multiple stacked branches.Nikolaus
04/10/2023, 11:27 PMgt log
output is 💯marcos
04/10/2023, 11:54 PMgt ur
does not exist as a short form of gt upstack restack
https://graphite.dev/docs/restacking-branches
I'm not sure what gt stack restack
would do since it doesn't say up
or down
.
Will have to try it sometime.
excerpting CLI --help
output:
$ gt stack --help
index.js stack restack Ensure each branch in the current stack is
based on its parent, rebasing if necessary.
[aliases: r, fix, f]
$ gt upstack --help
index.js upstack restack Ensure the current branch and each of its
descendants is based on its parent, rebasing
if necessary. [aliases: r, fix, f]
$ gt downstack --help
index.js downstack restack From trunk to the current branch, ensure
each is based on its parent, rebasing if
necessary. [aliases: r]
merrill
04/12/2023, 1:37 PMJacob Gold
04/12/2023, 4:06 PMgt usr
Jacob Gold
04/12/2023, 4:07 PMstack restack
will restack everything from the trunk branch up to the descendants of the current branch - i.e. both downstack restack
and upstack restack
Jacob Gold
04/12/2023, 4:07 PM