gt get allows you to pull your coworker's stacks from remote into your local repository to collaborate or see their changes on your own machine.
For example, coworker A creates and submits their branch:
gt create my_branch -m "My changes"gt submit
Then, coworker B pulls the branch to their machine:
gt get my_branch
This syncs all branches that
my_branch depends on (starting from the bottom of the stack). If any of the branches already exist locally and differ from the remote version, Graphite will ask to either overwrite your local changes or rebase them on top of the remote version.
gt get is also the recommended workflow for developers who work on more than one machine: submit draft PRs for your stack on one machine with
gt submit and then use
gt get from the other device.
We strongly recommend that coworkers who wish to collaborate on a branch both use
gt to ensure that the dependencies are managed and synced correctly as you work together.
Only branches that your coworkers have submitted with
gt can be synced down to your local environment, as we rely on the Graphite submission to keep track of the dependency tree.
If you want to stack on top of your non-Graphite-using coworkers’ branches, the best way to do this is
git pull and
gt branch track.