My stashed changes are completely fine, but out of that screen it's unreadable and I cannot figure out a thing. This started because I was on branch 'automatic-discard', finished it, pulled it to main. But my github desktop did not change branch, so I pushed a change later accidentally to 'automatic-discard'. So then it was one update ahead and one update behind main. I figured I would just push the latest changes to main and ignore that, but it completely broke the index somehow. Now I have this upstream and stashed changes hell. I've tried going to a new branch to push them but it's not working.
https://github.com/BreckEmert/Splendor-AI
#๐ I've completely nuked my github repo and I'm only making it worse
132 messages ยท Page 1 of 1 (latest)
@pulsar matrix
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Closes after a period of inactivity, or when you send !close.
Describe the step you done, and have you, at any time used force?
I guess the ideal scenario would just be pushing my stashed changes onto the current automatic-discard branch. never used force. I also have a backup made as soon as I got worried to fall back on
i've tried a bunch of stuff but i'm not sure any of it actually got pushed, as checking the web version i dont see new branches there
the only thing i have done then, is the two pushes to main 'final bug fixes and rendering fixes'
(same title on each)
github desktop says i need to fix my index before it lets me switch to automatic-discard. but maybe if i just do it via prompt and delete these latest two main pushes it doesnt matter?
yeah the two latest commits in main are probably broken. they even have the github text in them which i assume is bad
Latest 2, not one?
The latest branch on automatic-discard should just need my stashed changes
latest two yeah because i was trying stuff to fix it
Can you make sure that, currently, there are no change that haven't commit & pushed, or whatever not commit/push can be deleted and ignore entirely
yes i have a backup of the entire folder
just a right click copy paste of it, not a github thing
i believe the stashed changes i have, have not gotten pushed. as on the online github you see literal ">>>>> stashed changes" suggesting the informatoin isn't there
git fetch
git checkout main
git reset --hard origin/automatic-discard # DANGER command, this is to overwrite the state of the code as the branch from github.
This is make the your local branch main to the state of origin/automatic-discard
origin: the code data in github
and what history will this delete? turns main history into automatic discard history?
from main history
this would only change locally as of now
and after running those, do not use the following command until I told you can/to:
git fetch
git pull
git push
After doing those step, try if the code if it functional and working as expected
and is that solution better than something like this, which is conceptually what I think is needed?
git checkout automatic-discard
git stash pop
git add .
git commit -m ""
git push origin automatic-discard
I just feel like both options are getting at the same thing but one deletes history?
well because the lineage goes main -> create automatic-discard -> finalize it and pull to main -> make latest push to automatic-discard
Just clarifying, I don't actually know. That just seems logical and safe, I'm not used to doing things the 'right way' at all.
The issue is I don't see how it's logical ๐ฅด
And trying to interpreting what you say
just in the sense that the version before my stashed changes, is the latest version of automatic-discard
so linearly, my changes should be pushed to automatic-discard
anything else may be better in terms of a clean history but just worries me about safety
I would see if I can make a pr and see if you want that
I'm confused on what you describing
your solution makes main into the state of automatic discard, and then applies my changes. my solution just applies the changes to automatic discard. same end result, but yours also deletes history?
You probably cannot merge it back to main
Due to merge conflict
Unless you don't care about main
Then you should just switch the default branch to automatic discard and delete the main branch
i mean that sounds good
So perhaps I just go ahead and try that. After I run your commands how exactly do I visually tell if it's good? I can inspect the code and all locally?
Inspect the code and all locally
i cannot run git checkout main
ok i messed up and just typed git reset --hard so i had to do some extra steps but this looks correct
the last push is 'image generation rework' which is correct
now on github desktop i have the stashed changes - we should just push those now?
well im pretty sure that the bug fix code is just my stashed changes
this is my current github desktop and these stashed changes look like exactly what i want
If you verify everything is absolutely correct, you can:
git push ---force origin main
doesn't seem right as i still have an entire def missing pretty much and many <<<<< in my local files?
Did you apply the stash?
Ok, maybe reset again, I think there might be issue with the stash change
yeah i cant pop
Give me some time
https://github.com/BreckEmert/Splendor-AI/pull/10
Try check this if this might be what you want?
wow it looks beautiful but i cant fully open it yet
๐ so sorry but just confirming i hit the right button
leave my changes, obviously?
duh
yep, leave the change
I just went through the code via regex search [=<>]{5,} and remove all the line that have it, except on one special case that require me to guess the docstring on which is correct
so the changes in game look good but the generate images is missing def draw_game_state
causing lots of undefined vars
and still a bit of
<<<<<<< Updated upstream
<<<<<<< Updated upstream
I'm checking why they disappear in main, in somewhere your 2 commit remove the 5 line that causing undefined def
Or might be the change you made in automatic discard that never pushed to main
Perhaps are you trying to work with the second push?
I think the second push called 'final bug fixes' is strictly worse than the first
I couldn't manage to find them
Yep
yeah i think
https://github.com/BreckEmert/Splendor-AI/commit/c92163fcd1cd1f817bbb6de8f0751713e6cc2ca9
is the best commit as a baseline
it still has the github text problem but the changes look good other than that
maybe draw_game_state truly is vestigial i might be wrong
i think it was just replaced with render_game_state
honestly i think the only solutoin is to do mine
I cannot reliably add latest change from automatic discard to main
(my version of main)
I don't think there is anything wrong with the automatic-discard version + my stashes
Do you want me to attempt to guess and fix it?
Where is it?
If I pull up my copied github repo, and get it to pull automatic-discard
I won't recommend, unless you made another copy before doing so
then i will have good stashed changes
how can I give you my stashed changes?
could you just apply them to automatic-discard - there are not even that many changes
Technically, the one in main contain the stash change, just with the git error with it?
Well, the complicated is only combining the latest change on the automatic discard
The version I sent in the current PR should be the stashed change
sure, but there's github leftover and some other stuff that
my patch file has no github lines in it, it's a perfectly regular push
But where...
I couldn't find them, with regex apparently
i'm not sure, github is totally beyond my head hence why I'm here hahaha
i think i got something to work
right?
what if I push this to automatic-discard, and then you can see if there's any cleanup stuff needed?
I don't recommend you to mess up a correct branch
If you want to do something
Create a branch from discard and change that
well the changes are very small, i wouldn't classify this as messing anything up?
it would look even unnoticeable to someone who didn't know, right?
Well, because the current issue isn't fixed, I wouldn't recommend creating more thing that could either make fixing current more difficult or create more issue
Sure. But those issues are contained within certain pushes, and I do have a backup to where we started.
wouldn't this just be a push on top of something that at least gives us a solid place to look for ground truth?
can always delete the push later
Can you check my pr if it combine the change correctly?
the original one from 33 minutes ago?
Yes, but I updated it
Which so be reflected on the pr
I still haven't find where you said the git error thing
I'm going to eat and come back to this ๐ซก . since my changes were made with just some simple lines and have them backed up it should be np to look. just dont want to discard something that looks perfect
Thanks for all the help with this. I have some lessons learned and will be more careful in the future. Making sure to delete branches after I pull at the least..
This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.