This message was deleted.
# how-do-i
s
This message was deleted.
m
Copy code
matt@matt~/repo(main +)$ gt branch track
Tracked branch main with parent foo
p
Have you tried
gt branch track -p main
?
(The
--parent
flag)
m
Ahh wonderful. Does this not work with origin/main? I usually don't keep a main around and run headless
i.e. I come from a gerrit workflow / change-ids
j
ah, yeah you'll need a checkout of main locally
repo sync
should keep it up to date for you though!
m
Thanks
So I was just flailing around and it seems like something got forced merged into the repo without passing CI
I'm an admin and the only one on my team that has the ability to force merge but I didn't trigger it on the github UI
@Jacob Gold when I run
gt repo sync
it grabs
m.p.epperson/revup/main/foo
Instead of
main
j
when you ran
repo init
your trunk branch may have been set to something other than
main
because you didn't have it checked out locally, you can run
repo init
again to fix that
as for the PR that was merged, did you do anything in the graphite dashboard or was this just via the CLI?
m
Thanks! That seems to have cleared it up.
Any thoughts on the force push? I'm sure I'm just doing something dumb but it seems a little scary that it could skip CI / branch protections so easily
j
that's what I was asking about in my second message
Perhaps without
main
set as trunk graphite tried to push to it somehow, but I'm not sure how that would have happened if you didn't even have it checked out locally — I am correctly understanding that this happened to the
main
branch right?
m
Oh sorry! Yeah it pushed to main and broke it
I was doing a bit of frantic reverting 😓