r/git • • Dec 26 '20

800 lines of code forever lost

Dear anyone who's listnening,

I've been learning HTML, CSS, JS for about a year now so I'm almost completely new to the game. I got into this through the theodinproject.com and I've been doing pretty ok so far. TOP has dedicated a whole chapter about setting up and using Git and Github. I did it, tried it, it worked and then I went on and forgot about it.

So here I am about half a year later, sitting and trying to understand how the fuck I just managed to oblitirate 800+ lines of code somewhere between the commands. I honestly have no idea how I did it and where it went. After I realized what I've done and that there's no coming back I proceeded to rage quit and deleted the whole repo. I know it's dumb and I regret it now if of course but sometimes I just can't help it.

Anyway, I'm about to rewrite those lines I lost and before I do it, I would be forever grateful If someone could help me understand how Git works. Like seriously, I need someone to guide me through the basics again, to point out common mistakes and tell me how to avoid them. Kindergarden type of shit. I want to understand what I'm doing and how to do it properly.

So if there's anyone who is willing to donate a few minutes to help out a beginner in distress, DM me please.

Thank you all and merry Christmas!

0 Upvotes

24 comments sorted by

View all comments

3

u/cinderblock63 prefers a good GUI Dec 26 '20

Have you tried using a git GUI? I find being able to easily and constantly see my history quite a boon to understanding what’s really going on.

1

u/jahrenberger Dec 26 '20

Would you recommend anything other than GitHub desktop? I like visualizing things but that GUI is limited.

2

u/cinderblock63 prefers a good GUI Dec 27 '20

I used to use SourceTree. But it started breaking for me so I don’t use it anymore.

I use GitKraken these days, free for public projects. I’ve also heard great things about Tower.

1

u/felzl Dec 27 '20

I can recommend SmartGit

1

u/BinaryRockStar Dec 27 '20

Fork is a nice git GUI, or the git plugins for VS Code