Github, Go back to a previous version

Hey guys,

I’m sad cause I thought I could use the github but unfortunately I don’t know how to use it right…

This morning I tried to publish to remote server a few changes I had made to my files and there was a message about an error during the publish…
Tried a second time and got the same message.
And sadly realized that my site is not working at all… No page at all.

I tried to see what the problem is on my local files and noticed that there was a problem on my database connection file…
(C:\xampp\htdocs\stock\stock\dmxConnect\modules\Connections)
When I tried to open/edit it (with notepad), I was getting an alert that I have no permission rights for this file…

Anyway I prefer to go from a previous Git point I have that was working and have my files fixed from there (I have also kept localy my files…)

So, my question is:
How can I go to a few changed back from my git?

Tried to find a post in here to fix it but I’m not so sure if I screw up everything…

If anybody has an idea it would be much appreciated!

I don’t know about doing it inside Wappler, but if you use some other Git client you can open the project folder and then revert each commit till you reach the one you want

1 Like

Maybe I don’t fully understand it but you aren’t allowed to right click that commit and “revert to this point”?
Never used it but the option is there I guess

1 Like

Thank you all

By clicking this button “Reset to this commit”:

I will end up having the files of that commit?

Or I need to do something else first?

Interestingly, the reason I said “revert the commit” is precisely because I don’t know the answer to the question you’re asking, I only know the behaviour of reverting a commit. Maybe @ franse knows the answer? :slight_smile:

I don’t know the operation of “reset to this commit”.
But I assume the option you need is the one is two options above: “revert to this commit”.
Honestly don’t know the difference between both.

Like I said, never had the chance to use it, but I guess that it will revert the files to that commit.

thanks again guys
:slightly_smiling_face:
I’l wait… Maybe somebody is sure about it

I prefer to use SourceTree for this.
Revert will do what you are expecting… but state of files will be mixed.

Using ST, you get the option to “reset current branch to this commit”. On doing so, it will ask what you want to do with uncommitted files. I use HARD RESET option.

Additionally, if you want to reset the remote branch to selected commit as well… once you have done it locally, use git terminal to do force push - git push -f
Be careful though.

1 Like

Thanks @sid for your input.

I really like people that feel confident of what they say!!

But know what? I don’t have a clue of what you said and what I have to do…

I would say “you can’t teach an old dog new tricks…”
I’m the dog and I suppose it won’t be that easy to learn the new tricks! :wink:

Anyway I’m thinking of goinf back to my “cave” with the backup folders and dig for the “bones” I’ve left there in case “I’m out of food”…

This is something I can handle but I really have no idea of how I’m gonna reset my git or even delete it since I’m anable to use it in case I need it!

Anyway, as Freddie said “The show must go on…” no matter the difficulties are.

In the old days I worked in VAX/VMS Architecture and Assembly… Compared to using Git I found that simple. All I’ve ever managed to do with Git is mess things up. These days I have reverted to using TimeShift (a Linux backup tool). Am sure brain surgery is easier than getting to grips with Git. However it is something I would like to learn to use properly, but for now I’m scared of it.

:smiley:

1 Like

I was scared of Git at one point too.
And I started using it only after backups and shared drives wouldn’t work any more because we had a team working on shared code - so I was sort of forced to use Git.

Git has a learning curve, but unless you start, you would remain a cave-man.
Even after 2-3 years of using Git almost every single day, I only know a handful of commands and processes - enough to get by.
I use Wappler, terminal, source tree and VSCode for managing Git stuff.
If I ever learn all Git CLI commands, just terminal and VSCode could be enough.

You could just create a dummy repo, and play around with it. That’s how I started.
CC: @Cheese

2 Likes

Un update…

I just took out the git and published my project and everything work fine!
image

I don’t know if I will use git again… Since I don’t know how to use in case it is needed there is no reason for me to have it

Thank you all guys

You will try again using Git again

To be honest, all you had to do was take a .zip backup of your project, and then try the options we suggested like “Reset to this commit” and then see what happened, you didn’t have to wait for someone to be sure :wink:

1 Like

Now i see a ray of light coming into my cave I think… :wink:
(I suspect I’m gonna try it again… I just have to study git stuff better, “branches” etc)
Thanks again brother!

@famousmag - read this article first - Remote GIT branches sync
My strong advice is to start using 3rd GIT tool - like GitHub for Desktop.

2 Likes

Thanks @Notum, I will my friend

Parakaló

1 Like

GitHub’s app is not very good in my opinion. SourceTree is much better.
Only caveat with SourceTree is that it does not have ‘side-by-side’ code diff. I use Wappler for that.

1 Like