I have a problem with git. I develop my local host, push the changes to my repo, and then pull to my site. I recently created a page on my localhost that worked just fine. Then I clicked on my repo and pulled it to the site. For some reason, the changes violated my site. For example, there are hashes of broken commit and working commit:
ABCDE 'This commit works on the local host and in real time on the site
ZYXWV 'This commit works on the local host, but not in real time.
So, I made commit ZYXWV on my localhost and transferred it to the repo. Then I pulled ZYXWV into my live site, which broke it. To fix my site, I did the following:
git check ABCDE
So now my site is working. The only problem is that my live site does not sync with my repo, which means that I canโt change anything without getting broken code. I donโt need a broken code, and everything is fine if it is deleted. I just need a way to restore the repo with ABCDE again.
Hope that made sense. I'm not so good with git. Thank you for your help.
source share