Long story short: I’m starting on gamedev and want to get accustomed to version control without taking too much time learning about it

I know this is kinda asking to be spoonfed the answer, but truth is I don’t have a lot of free time and wish to focus mine on not losing interest in this new hobby (I know getting stuck on details and scope is one of the main pitfalls of new gamedevs). I also want to get used to do things the right way (otherwise I wouldn’t even be thinking about it this early) anywhere I can that isn’t too distracting from the goal. At least I’m contributing discussions to the community.

I know there are a few self hosted git options, but I don’t really understand much of what using git is like, technically I “learned” to use github for version control when doing a web dev course but I couldn’t keep a single part of that segment in long term memory.

I am looking for something I can host on my server and that I can push to from godot or a gui client (from linux). I am looking to selfhost partly for the giggles (if it’s somehow too complicated I’m willing to give up on that part) and partly because I don’t want to keep my stuff on someone else’s server if I can avoid it. I’m also trying to avoid having to learn about how to properly use it for as long as I can.

I think I’ve read about gitea on here before? I’d rather avoid ai-assisted projects because of the low commitment threshold to push updates, I’m pretty sure they’re more likely to give up with the updates than caffeine fueled coders thanks to the sunk cost fallacy.

I don’t plan on publishing anything on the time being, maybe after a while I might look into it more and use a proper service, one of my long term goals is making a foss game that people want to play, but that’s long down the road, I rather learn how to make games first.

  • atzanteol@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    2
    ·
    3 hours ago

    [I] want to get accustomed to version control without taking too much time learning about it

    Plz send the codes! 🙄

    You don’t actually need a git “server” if you’re not planning to share your code with anyone.

  • danA
    link
    fedilink
    English
    arrow-up
    13
    arrow-down
    1
    ·
    edit-2
    6 hours ago

    I’d recommend learning Git entirely locally first. Git is a distributed version control system, which means that it doesn’t need a server. All of Git’s features are available to you even with just a local repo.

    Honestly, using Github is totally fine as a beginner. Similarly, using a GUI is totally fine. Dont let people shame you into using the CLI all the time if you don’t want to. It’s good to have a high level understanding so you can deal with things when the GUIs play up, but day-to-day usage is totally fine in a GUI. I like gitg because of how simple it is, but I like the Git integration in VS Code, and Jetbrains IDEs (Rider, WebStorm, etc) too. I’ve heard good things about GitKraken but it felt a bit slow last time I tried to use it.

    When you do want to have the repo on a self-hosted server for your own use, you don’t actually need anything fancy like Gitlab or Gitea. Technically all you need to do is copy the repo from your computer onto the server and set up a Git server on it. That’s it. Git works over SSH, so you’d just add a “remote” that points to the server.

    The best place to start with that is probably the official documentation: https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols

    The repo on the server is not really any different to the one on your computer. All you’re doing when pushing is synchronizing them - pushing new changes from your local repo into the one on the server.

    Where web UIs have an advantage is that they make it easier to browse the repo, show it to others, have pull requests and CI support, etc. Lots of value-add features on top of Git itself.

    I’d highly recommend Forgejo instead of Gitea. The Forgejo site has a list of reasons why, so I don’t go over that in detail. Forgejo is what powers Codeberg, so you could try Codeberg first, then if you like it, self-host the exact same system. Note that Codeberg only allows open-source projects.

  • Static_Rocket@lemmy.world
    link
    fedilink
    English
    arrow-up
    27
    ·
    edit-2
    7 hours ago

    This may sound terse, but I’m just trying to respect your time:

    1. You don’t need a server to start using git
    2. You don’t need a forge to host a git repository (gitweb works fine for indexing, reading, and cloning). Gitea, gitlab, forgejo, etc are all forges designed for full multiuser development with kaban boards, issue trackers, and CI pipelines.
    3. If you aren’t publishing anything then just play around locally with an IDE plugin for git or one of the listed GUIs https://git-scm.com/tools/guis

    If you ever do feel like publishing your work, it’s just a git remote add and git push away.

  • TheKracken@lemmy.world
    link
    fedilink
    English
    arrow-up
    20
    ·
    9 hours ago

    Check out this site https://gitmastery.me/ it makes it a game to learn git. There are some core concepts that are 90% of what you need to know. Most everything else is specific issues and strategies. If it’s just you.working on a project you can get away with learning commits, pushing, branching, and merging.

    • HelloRoot@lemy.lol
      link
      fedilink
      English
      arrow-up
      3
      ·
      7 hours ago

      I got away with just the main branch in my personal projects so far. And I found git stash very useful. But most of the time it’s just:

      1. Do a unit of work
      2. Git commit
      3. Git push
      • lemmyvore@feddit.nl
        link
        fedilink
        English
        arrow-up
        1
        ·
        37 minutes ago

        TBH it do be like that when you’re a solo developer.

        Branches come in after a certain level of complexity, if you need to do some kind of separate feature and you’re not sure how it would fit into the main project or something like that.

        They can also be useful if you start automating things. Updating a branch can be used to signal that a commit needs testing or deployment.

        And of course branches are super helpful when multiple people are involved.

        [On a side note, it’s interesting we still use the “branch” terminology even though modern source control systems aren’t trees anymore.]

  • L_Acacia@lemmy.ml
    link
    fedilink
    English
    arrow-up
    4
    ·
    6 hours ago

    Since you are a Game Dev, Oh My Git! is a game about learning Git in a slay the spire style, not the most polished product, but it’s pre ai.

    If you want to explore the self-hosted option (you shouldn’t feel pressured to), I recommend Forgejo. It’s a fork of Gitea that powers Codeberg (and other git forges)

  • SavvyWolf@pawb.social
    link
    fedilink
    English
    arrow-up
    2
    ·
    6 hours ago

    As others have mentioned, if you only have one device and functioning backups you don’t need a server side component to use git.

    If you do decide to host something, I’d recommend using Forgejo over Gitea. Forgejo is a hard fork of Gitea made after the latter changed their source code to “open core”.

  • CameronDev@programming.dev
    link
    fedilink
    English
    arrow-up
    9
    ·
    9 hours ago

    Ive run gitea and gitlab, they are both trivial to run. (Both probably have AI code, but in my experience gitlab has been rock solid).

    Search for docker compose instructions, they are generally the quickest and easiest way to get going:

    https://docs.gitlab.com/install/docker/installation/#install-gitlab-by-using-docker-compose

    https://forgejo.org/docs/v15.0/admin/installation/docker/#docker

    The upside of docker is that if the do push a bad version, its trivial to downgrade and use the previous version, just update the compose file and restart.

    But, If you really want to get on with game dev, just push to github/gitlab/codeberg. Theyll get you started way faster and you can worry about your own self hosted thing later when it matters more to you. Its easy to transfer between them later.

  • verstra@programming.dev
    link
    fedilink
    English
    arrow-up
    3
    ·
    8 hours ago

    I’d suggest you start locally (no server) and with Jujutsu, which is an interface that uses git internally.

    It works like this:

    • jj new starts a new change (new feature/a bugfix/refactor)
    • jj desc "a description of your change" gives that change a description, so you can find it easier later
    • jj log shows you the history of your changes

    That’s all you need for now.

  • Attacker94@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    9 hours ago

    Gitea is great, it took me about an hour or so from not knowing anything about it to having a full docker container up and running. If you are not too accustomed to self hosting I would caution against thinking it will be easy to have the server accessible to the internet as that assumption is incredibly wrong.

    If you want to learn how to do it in a way that doesn’t screw you in the future, I would shy away from the GUI side of things, everyone who helps with issues related to git operates under the assumption that you are familiar with the CLI so if you don’t want to have to translate CLI commands to their respective actions in the GUI, I would bite the bullet and learn the commands.

  • hendrik@palaver.p3x.de
    link
    fedilink
    English
    arrow-up
    1
    ·
    8 hours ago

    Gitea is fine. If you like a hosted option you can use codeberg.org . But even GitHub is better than nothing. If you’re using some development environment, try to connect it to your Git repository, that’ll do it for you and all you need is to press 2 buttons.

    And think of it as an investment. Sure, you gotta put in the one or two hours to (re)learn the basics. But at some point it’ll save your ass and save you half a day of unnecessary work.

  • hoover900@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    2
    ·
    9 hours ago

    I’d recommend using Perforce over Git. Perforce in my opinion is easier to understand and use, as well as more widely used in the game industry.

    The big difference between the two is centralized vs decentralized, Perforce being centralized and Git being decentralized. Plainly put P4 is one server with clients checking files in and out from it and tracking those changes, where Git is multiple servers merging their changes together.

    In your use case here both are free to use. You should keep in mind that P4 wants to run on bare metal as you mentioned hosting this in your own server, so if you were thinking of spinning up something in proxmox or docker you may run into issues.

    Whatever you use, making sure you have meaningful commit messages is the most important thing, especially if you’re going to be working with others. A brief idea of why a file was a changed six months ago is much more helpful than a commit message that says “…” or “updated”.