I mistakenly exited from `gt split --by-hunk` how ...
# how-do-i
p
I mistakenly exited from
gt split --by-hunk
how do I come back from where I left?
p
(If applicable) To help us more clearly understand what you're trying to do, please provide additional details about: - Screenshots / debug logs / list of commands you've tried to run so far - Your workflow - Current state
hey Paulo, I believe if you exit it early then no new branches will be created and you should be in the original state?
p
Yes, but it was huuuuuge work and I would like to retrieve where I was
p
ah I'm sorry about that but I don't think the in-progress state is saved šŸ˜“
j
any commits that are already created will be in
git reflog
at the very least, but there will be some manual work beyond that
p
What do you mean by manual work?
j
creating branches at those points, using
gt track
to recreate the stack, etc
p
Well.. I finally created the stacks but it doesn't matter if I use
gt sync
or
gt get
I'm always getting 16 remote and local changes. If I submit the stack this diff goes to my coworkers. We're heavilly blocked since no one can properly work or sync the stack
image.png
Copy code
gt up 
feature/migration-queries
Checked out feature/meta-config.
This branch has been updated remotely since you last submitted it.
Last submitted version: v5 (remote at v7).
Run gt get to fetch remote changes.
paulo in multi-number on ī‚  feature/meta-config on 🐳 v28.2.2 using ā˜ļø  default/stp-core-dev 
āžœ  gt get   
🌲 Fetching branches from remote...
Running git fetch: [========================================] 100% | Done
staging is up to date.

šŸ”„ Syncing branches...
Branch feature/migration-queries is up to date with remote (PR #2330 v4).
Branch feature/meta-config is up to date with remote (PR #2331 v7).
Branch feature/meta-clients-middleware is up to date with remote (PR #2332 v7).
Branch feature/workflow-ids-refactor is up to date with remote (PR #2333 v7).
Branch feature/flows-helpers-templates is up to date with remote (PR #2334 v7).
Branch feature/shared-activities is up to date with remote (PR #2335 v7).
Branch feature/http-layer is up to date with remote (PR #2336 v7).
Branch feature/user-chat is up to date with remote (PR #2337 v7).
Branch feature/onboard is up to date with remote (PR #2338 v7).
Branch feature/dda-scheduler--bankslip is up to date with remote (PR #2339 v7).
Branch feature/simple-core-workflows is up to date with remote (PR #2340 v7).
Branch feature/sys-workflows is up to date with remote (PR #2341 v7).
Branch feature/miscellaneous is up to date with remote (PR #2342 v7).
Branch feature/pix is up to date with remote (PR #2343 v7).
Branch feature/pix-out-replay is up to date with remote (PR #2344 v7).
Branch feature/open-finance is up to date with remote (PR #2345 v7).
Branch feature/jotaweb is up to date with remote (PR #2346 v7).

šŸ„ž Restacking branches...
feature/migration-queries does not need to be restacked on staging.
feature/meta-config does not need to be restacked on feature/migration-queries.
feature/meta-clients-middleware does not need to be restacked on feature/meta-config.
feature/workflow-ids-refactor does not need to be restacked on feature/meta-clients-middleware.
feature/flows-helpers-templates does not need to be restacked on feature/workflow-ids-refactor.
feature/shared-activities does not need to be restacked on feature/flows-helpers-templates.
feature/http-layer does not need to be restacked on feature/shared-activities.
feature/user-chat does not need to be restacked on feature/http-layer.
feature/onboard does not need to be restacked on feature/user-chat.
feature/dda-scheduler--bankslip does not need to be restacked on feature/onboard.
feature/simple-core-workflows does not need to be restacked on feature/dda-scheduler--bankslip.
feature/sys-workflows does not need to be restacked on feature/simple-core-workflows.
feature/miscellaneous does not need to be restacked on feature/sys-workflows.
feature/pix does not need to be restacked on feature/miscellaneous.
feature/pix-out-replay does not need to be restacked on feature/pix.
feature/open-finance does not need to be restacked on feature/pix-out-replay.
feature/jotaweb does not need to be restacked on feature/open-finance.

Already on feature/meta-config.
paulo in multi-number on ī‚  feature/meta-config took 6.7s on 🐳 v28.2.2 using ā˜ļø  default/stp-core-dev 
āžœ  gt status
Passing command through to git...
Running: "git status"

On branch feature/meta-config
Your branch and 'origin/feature/meta-config' have diverged,
and have 1 and 1 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)

nothing to commit, working tree clean
The logs above shows logs for the stack number 1 out of 17. At the bottom of the stack I don't see any changes.
j
gt submit
!
git status
isn't graphite-aware šŸ™‚
p
Why I should do gt submit since I didn't update any code. The modify and submit was done by coworker.
For example, I did submit in a single stack and there is no diff at all
I don't understand why do I need submit if there aren't any changes
j
i'm sorry, i might be a bit confused by what you're trying to do
the reason
git status
shows the "diverged" message is because
gt sync
rebases the branch
the way to make remote and local match is to submit