Nathan Flurry
12/11/2023, 10:14 PMgt create then a series of gt modify commands afterwards for iterative changes? if so, is it recommended to amend or commit when using gt modify?
i read somewhere that a stack should always be in a test-passing state.Nathan Flurry
12/11/2023, 10:15 PMNick S
12/11/2023, 10:19 PMgt squash prior to publishing the PR
To make it easier on reviewers, I avoid the gt squash once they start reviewing the PR and manually squash to the latest pushed commit when addressing the PR commentsNathan Flurry
12/11/2023, 11:12 PMgt sync # pushes, pulls, and rebases all relevant branches
gt co # gt checkout, interactively lets you chose the parent stack for the next set of changes
# make changes
gt c # gt create, don't bother with branch names. similar to git branch && git commit
# make more changes if needed until compiling & tests passing, then run
gt m -ca # gt modify --all --commit, prompts for commit message will add a commit to the current stack. similar to git commit
# submit changes for review
gt s # gt submit, submits a pr, go request reviewers
# start from top again
Editing mid-stack
gt sync && gt co # gt checkout, checkout the stack in question
# make relevant changes
gt m -ca # gt modify, commit the changes
gt s # gt submit, pushes new changesNathan Flurry
12/11/2023, 11:12 PMkush
12/12/2023, 6:08 AMDavid Balatero
12/12/2023, 2:56 PMDavid Balatero
12/12/2023, 2:56 PMgt guide workflow in the next CLI release, also i'm going to get it on the docs site this week)Nathan Flurry
12/12/2023, 11:51 PMgit create -am is clear for anyone who has worked with git and is used to the single letter flags, but most jr engineers i run across would be confused by this syntax.
I might be missing something: why is the --stack flag required on gt submit --stack for pr #2? there's no descendants of the pr yet.
gt stack --submit differs from the gt stack submit command shown in gt stack --help and differs from the gt submit syntax used in the previous code block. Confusing, even though they're all doing the same thing.
Under "Merging your stack", I would link the phrase "top of the PR" to your glossary.
Another misc idea β if you publish the --help output to the website somewhere, it might be nice to be able to click on a command to get more details about it.
There's a lot of documentation and most of it uses the CLI syntax differently, so even though I only really need to learn 3-5 commands to get up and running, it feels like a lot more (in addition to how stacking works overall). Honestly, less and more guided docs would be very helpful.
Last thing β it's sometimes helpful to see the output from the command line instead of just the commands I'm putting in.Nathan Flurry
12/12/2023, 11:53 PMNathan Flurry
12/12/2023, 11:59 PMgt modify is only introduced at "addressing reviewer feedback." i don't know how you guys see this internally, but it would've been incredibly helpful if the "creating a first pull request" example included a line about gt modify, something roughly like:
# Create a branch with a single commit using gt create
gt create -am "feat(api): Add new API method for fetching users"
# If you need to make follow up changes to the stack
# We recommend keeping changes as atomic as possible, so this should be seldom used
# gt modify -a
# Push changes and create a new pull request with gt submit
gt submit
that small blurb (but better phrased) i think would've make the whole thing way clearer for meDavid Balatero
12/13/2023, 1:40 PMDavid Balatero
12/26/2023, 8:29 PMDavid Balatero
12/26/2023, 8:29 PMgt guide workflow to match)