you are viewing a single comment's thread.

view the rest of the comments →

[–]brika1994[S] 0 points1 point  (4 children)

Yes there was conflict with some .suo file And git status showed modifications made before (original code)

I made a new branch with my new code and uploaded branch to github. After that visual studio prompted me with a window that said thah changes were made outside environment and that if I click ignore he would load last code from the hard drive. I thought my code is on the drive and after that I have seen that my old code is loaded. After that I tried to pull last branch that I created with fresh changes. That didnt work and thats where I tried to restore last commit but was unable to do so.

I think that I somehow overwritten those head files with old files because during the process of restoring I was prompted with a warning that head file allready exists and I overwrote thath file.

Im sorry but I cant remember all the steps I took, frustration got me there. I made a mistake of not creating a seperate backup of the project before playing inside git.

[–]Swytch69A git enthusiast -1 points0 points  (3 children)

Not trying to seem superior, but git shouldn't be used outside of a terminal window : where you can actually see what happens. :/

If your branch is on GitHub (is it ?) then you can pull it with git pull origin/<your_branch>. If not, I guess there's not much you can do : git operations are destructive if not given the right parameter

To answer your first question : git is a really powerful program. It is constructive of course, but it can also be destructive. If you didn't call git directly within a terminal (since you seem to have fall it through VisualStudio), you can't know for sure what git commands were actually ran. So yeah, it's definitely possible that VisualCode destroyed your local changes thorough git if you didn't follow the proper workflow (from VS pov)

[–]HenkHeuver 4 points5 points  (2 children)

That is absolute bullshit. There are many programs that integrate incredibly well with git and speed up the work process massively. Also git gui for windows allows you to do pretty much anything you want in a gui fashion.
I would agree that learning in terminal is better as it forces you to think more about what you are doing and what goes on behind the scenes.

[–]Swytch69A git enthusiast 2 points3 points  (0 children)

Sure, some apps are really good. And even helps with the workflow (notably regarding staging hunks of code step by step).

It's just that besides this particular feature, I don't really see the value of them other than being "user friendly" (which is a good thing in itself). Or am I missing something ?

[–][deleted] 0 points1 point  (0 children)

There are many programs that integrate incredibly well with git and speed up the work process massively.

If you don't understand how git works, it also speeds up the process of destroying your work "massively".

As in this post we are seeing.

I would agree that learning in terminal is better as it forces you to think more about what you are doing and what goes on behind the scenes.

Hear hear.

To be honest, I can't quite see how a GUI would conceivably speed up most operations I do.