GitHub Discussion

One in my opinion important advice is using a version control system like Git, even as a solo amateur developer. It’s really worth the effort.

8 Likes

100% yes.

Until you really dive in, the feeling of freedom and security that Git provides is unknowable. You will no longer feel locked-in or hesitate to experiment. I wish I would have learned it sooner.

7 Likes

Let me add that you don’t have to learn to use the git command line. Download GitHub Desktop, and it’ll be enough for most casual developers. And it’s a heck of a lot easier to understand.

8 Likes

FWIW, I’ve always hated git. It’s horrible. And lives up to it’s name of being “a git”. I’ve never found it useful at all for productivity. I only use it to publish code and that’s about it. It has the most horrible and inconsistent command set possible. It’s as if each command is specially designed to look like it does something and actually do something different. Next time you get a “detached head” or whatever, you’ll know the misery. Last time i used github it was refusing passwords. Apparently, they’re not good enough anymore. More misery, pain and suffering and time total wasting.

Just keep your files yourself with plenty of backup copies. You can’t go wrong. If you want an offsite copy, put them on a cloud. That’s all you need.

3 Likes

Anyone can do as they like, but I disagree on just making copies as @jkj_yuio said.

The problem we are talking about here will happen to all programmers (and to you, too, @Tale ): You have written code that works fine, then you change something and it doesn’t work anymore. Now you try to fix it and can’t get it fixed again. Now you HAVE to “roll back” the code. You could do this with
(a) plenty of copies
(b) Git
(c) a Git competitor which is easier to use.
I recommend Git.

11 Likes

In fact this exact thing happened with my Ectocomp game! (I did not have version control)

2 Likes

Is it weird that I find “drag and drop” and “Git Desktop” more intimidating than “Git Command Line”? Granted, with how many projects there are out there that have a Git hub repository but no simple .zip/.deb download as an alternative to doing a git clone, I kind of wish their was an equivalent to Aptitude for git repositories.

Granted, I’m a Linux user that does everything not done in a web browser from the console who has written bash scripts consisting of just a shebang line and one line of actual code because there are commands with very complex syntax where the syntax almost never varies but I use them so infrequently I’d have to relearn how to use them if I didn’t have the script.

4 Likes

Same, lol

3 Likes

They’re not, over ssh. You need to use public key encryption.

But like I said above, use GitHub desktop. No cryptic command set. No detached heads.

5 Likes

ok, you want to roll back the code;

You’re developing away making changes and suddenly, as you said, you discover something is broken. Now you can’t just “roll back” because you want to keep your new edits (mostly). How do you do this? Is this the git “stash” thing or do you check into git a broken version?

Then you roll back to your last “known good version”, and now you need to incrementally add in your new changes until you find the fault. How do you do this from the broken one, cherry picking the edits in question?

Then finally when this all works, how do you make this the current working version again.

I suspect this is a lot of gitting about, when two copies would have worked much easier and quicker.

2 Likes

This is what i mean. Here i am publishing code to anybody and passwords aren’t good enough anymore. I understand the need to secure some accounts, but I’d still like a non-secure option for people who just want to put stuff out there.

3 Likes

@moderators split request discussing Git/version control. Originally was advice but has become a tangent. Post 20 was the advice, then 21-22, 25-32 are version control tangents.

3 Likes

Yeah, would be good to split this. I, too, did got off-topic, sorry. But I think version control IS a good programmer newbie advice. So are no-code frameworks (only for some authors, because other will find coding nearly as easy as clicking together a program in a no-code-framework.)

2 Likes

For a hobby coder working solo on an Inform project, is it really useful? Does it add much value compared to good 3-2-1 backup practices? Is it really important to learn how to perform commits, fetches, merges, and manage branches? I’ve installed Github Desktop. I’m not a developer, and I don’t understand anything about this tool. It’s not the tool’s fault; I would need to take the time to learn how to use it. But is it worth it? I don’t understand what it could bring me (although I can see very well how Git is very useful in the context of collaborative development).

1 Like

For what it’s worth, Git is not for backups. Git is for version control.

Backups are for when you lose data and must retrieve it from somewhere else.

Version control is for when you change the data, and you want to track how the data changed, in what order, and which changes you would like to keep, swap out, or remove in the final product.

Backups are for security, and version control is to create sandboxes in your project for non-destructive experiments and changes.

If you’re just looking to keep your data safe from something bad happening to your computer, then there are plenty of solutions for this, including 3-2-1.

If you’re looking for a way to easily explore and test alternatives or ideas, without needing to build new and separate test platform projects, then you want version control.

Version control is best-used when you establish a new commit/snapshot after every single feature you add, change, or remove, because then you can freely mix and swap these individual features and changes during a merge later, if desired.

EDIT: I replied because I feel like this is on topic. I am not discussing the specifics of Git here; I am explaining the difference between backups and version control, which is general knowledge that would be important for a non-coder to have.

12 Likes

And I thank you for your explanations !! Well, in light of that, I think I’m not a good enough programmer for such a level of version control to be useful to me. The various features are tightly interwoven, as each one provides services that are used by some of the others. So it’s impossible with my code to say, for example, “let’s go back to version n-2 of scope management” without an impact assessment on wayfinding or the use of the player character’s perception abilities, for instance. This doesn’t undermine the value of Git; I just think it’s more suited to developers capable of more elegant compartmentalization through the use of appropriate design patterns.

4 Likes

For single-person spare time projects, my experience is that 95% of the time the simplest possible way of using version control works great. When I work on software with other people, or when I juggle several unrelated tasks at the same time that I must separate cleanly, all the things you mentioned matter. But I still find version control useful for myself when it’s just a linear history: one commit after the other, nothing else. Simply having a record of when and how I last modified each line is useful because it gives so much more context for when I wonder what I was doing/thinking back then.

Organizing all of one’s changes into coherent commits with meaningful messages is also somewhat optional - in some cases I try to stick with it, but while writing and editing prose, many of my commits are along the lines of “here’s everything I have (re)written over the past several hours”.

I am acutely aware of git’s great barriers to entry and user-hostility, so I’m not gonna tell everyone to learn git. I just want to counter the impression that getting value out of version control requires wielding it like a team of professional software developers would.

7 Likes

I completely agree with the usefulness of keeping a history of one’s development, documenting the motivation behind changes, and being able to compare two versions of the same code to deduce modifications. That’s exactly what I do, so I think we are entirely agreed (and besides, I’m such a control freak that I wouldn’t sleep well if I didn’t do this).
I save my code every day in a numbered and dated version, in a dedicated local repository (which is also backed up and externalized). Each feature in my code has its own version number along with a short text, a kind of mini release notes, all organized in a specific index. I use text comparators when I need to track the change history. As you mentioned, I believe I don’t need to learn to use version control systems because I’m not working in a team.

1 Like

In like 90% of my personal projects I never actually end up rolling anything back or doing anything more complicated than just having a single branch. But the important thing is that you have the option, and it’s often useful to look back at your commit history even if you’re not planning on doing any major shenanigans with it. Plus, for game jams and stuff it’s nice to tag the official “jam” version before continuing to a post-jam update.

In addition to that, github (or gitlab if you prefer) offers a bunch of benefits that don’t strictly rely on using git (sharing/publishing your code as open source, hosting documentation, serving as a remote backup, github pages is useful for hosting a browser-playable version for beta testing, etc)

8 Likes

That’s very interesting; thank you for providing this context. As for me, it seems to go far beyond my needs and my project, which is highly focused on a series of very specific interactive fictions that will likely just be offered in .gblorb format, to be played on an interpreter app like Lectrote. I don’t think my technical skills will allow me to go further, participate in jams, produce sophisticated code embedded in customized websites, or have the time to explore all these possibilities and the collective practices associated with them in depth. Simply submitting two stories that I hope will be engaging to two annual competitions is already quite a sufficient challenge, and I believe Git would be more of a burden than a help in my case.

3 Likes