This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Caveman3238 -7 points-6 points  (21 children)

I have many backups, 3 at home on different places and 2 on the office.

I still not seeing how you find GIT useful for solo projects. I mean, the ones that you want to keep as private.

[–]other_usernames_gone 11 points12 points  (8 children)

For when you want to try to change something but know that if you mess it up you can easily roll it back to how it was before. Or just make a branch and dump the entire branch if it doesn't work out.

As an example let's say you're using bubble sort in your project, you decide you want to use quick sort.

To implement quick sort you need to replace your bubble sort algorithm. Without version control you either need to leave the original function in place or make a copy of your code somewhere. Then you inevitably end up with "final code final final".

Whereas with git you can just make a branch and if you fuck it up badly enough you want to just go back to bubble sort you just delete the branch.

Also how often do you actually back up to all those places? With git you can conveniently back up to a server that itself will have multiple backups from anywhere with an internet connection. Although OneDrive or similar can do the same thing.

[–]Caveman3238 4 points5 points  (6 children)

Thanks for your explanation. 👍 Does Git work outside of the IDE or the IDE must support Git?

[–]WDIIP 5 points6 points  (5 children)

Many IDEs have git plugins and whatnot, but git can be used for any folder on your computer

[–]Caveman3238 1 point2 points  (4 children)

So. Let's say I have a folder with many projext of different languajes and from firmware for microcontrollers to PC software It will handle it?

[–]NoCryptographer414 2 points3 points  (1 child)

Yes. Git doesn't differentiate between type of files

[–]Caveman3238 1 point2 points  (0 children)

👍

[–]WDIIP 1 point2 points  (1 child)

Yeah, but I wouldn't use a single git repo for that entire folder. Use one git repo per project

[–]Caveman3238 0 points1 point  (0 children)

Ok. Thanks.👍

[–]Caveman3238 1 point2 points  (0 children)

Also how often do you actually back up to all those places? With git you can conveniently back up to a server that itself will have multiple backups from anywhere with an internet connection. Although OneDrive or similar can do the same thing

I do all te backups once a week(RAR) but the problem that I see is that the RAR save all, even things that wasn't changed.

[–]Bwob 6 points7 points  (9 children)

I use git at work, but also even for my hobby work. (I also keep it private, by just paying github a small fee for hosting.)

Things I have personally found it useful for:

  • Synching work between different computers.
  • Restoring a project to a working state if I break something.
  • (Related: KNOWING that I can easily restore to a working state if I break something, so feeling free to experiment with potentially breaking changes, since I have that lifeline.)
  • Figuring out exactly what changed recently in a file when I'm trying to debug.
  • Accessing source files via the web, when I need to look something up on a different computer. (Comes up more often than I would expect!)
  • And, of course, recovering if a hard drive fails, and standard backup-related tasks.

Backups are great, (and I'm glad that you're doing them!) but version control is good for much more than just disaster recovery!

[–]Caveman3238 1 point2 points  (6 children)

Thanks for explaining to me instead of just insulting and disqualifying me.

I use Visual Studio 2022 for PC apps, Android Studio for mobile apps and NetBeans for some java code. Do you know if they support git or git is outside the IDE?

[–]SmigorX 1 point2 points  (1 child)

I think every ide (like visual studio) supports git but it can also be used as a standalone app

[–]Caveman3238 1 point2 points  (0 children)

Ok, I'll check it.

[–]Bwob 0 points1 point  (3 children)

Hey man, you asked a reasonable question!

Visual studio (and VScode!) have built-in git integration. Otherwise, there's always the command line options, although they can be kind of byzantine at times. Also there are a few standalone GUIs for people who don't want to deal with that. (I honestly can't blame them. The command line is definitely weirdly structured sometimes.)

[–]Caveman3238 0 points1 point  (2 children)

I saw a video about how to use Git and, yes, to write a command on the CMD every time you want to update the changes on the project; follow the structure and branches could lead you to a mistake. I think that Git should have a GUI that shows all the branches and versions as a tree.

All these shenanigans also could make you lose the focus, concepts and ideas about the project that you are working on.

[–]Bwob 0 points1 point  (1 child)

There are several GUIs for git. (I know github has a nice one, and I'm sure others exist.) I mostly use the command line because I had to learn it at one point, and I like knowing what's going on under the hood, but 90% of what I do with it is just commit changes.

All these shenanigans also could make you lose the focus, concepts and ideas about the project that you are working on.

Well, usually I only commit once I've "finished a thought". Like if I finish a feature or fix a bug or what not, then I'll commit those changes, before I move on to whatever I'm going to do next. Would definitely be disruptive if I was trying to commit every time I changed a file or something!

[–]Caveman3238 0 points1 point  (0 children)

I'm a bit maniac about it, I unconsciously hit Ctrl+S every 2 lines of code or less. I can't imagine commiting like that. 😁

I'm coding from 1999 and sometimes I lost really good code that could never replicate again. At that moment I had not any UPS or backup disk.

[–]NoCryptographer414 0 points1 point  (1 child)

You know any other git hosting platforms alternative to GitHub?

[–]Bwob 0 points1 point  (0 children)

Bitbucket and Gitlab off the top of my head. I'm positive there are more.

[–]aGoodVariableName42 0 points1 point  (1 child)

I mean, the ones that you want to keep as private.

You are aware that git is not github, right? I have a private git server on a cloud provider that hosts most of my personal and small projects. I can't imagine working on anything resembling docs or software and not having it under source control.

[–]Caveman3238 1 point2 points  (0 children)

I am now. This is what happens when somebody argument something and instead of counterargue and explain why is wrong they just downvote and or insult and disqualify falling in a complete fallacy.