emergency i here pelpol talking a bout version controll but how do i use it? please it is my snake game i’m working on
Git is the most common one. You have to install it for your OS, it depends on your OS how to install it.
It’s possible that git is already installed on your system. Just type git in a terminal/console/cmd, if it is not found you have to install it, if it was found you’ll get a small help.
There are some introduction videos on the git page:
With an installed git you can go into your project directory (in a terminal) and if there is no (possibly hidden) .git folder, you can type git init to initialize git for your project. That’s it.
Than you have to add files you want to manage with version control and commit them with a commit message.
Watch some youtube videos for git for beginners, just search for git there. If you have issues, please ask here.
There are also tools to manage git with a gui, like VSCode or GitHub desktop.
Ignore GitHub for now (or forever, there are alternatives) and manage your git local on your machine. I would suggest to use the terminal for the beginning.
Probably unpopular opinion but if you work alone on a small-ish game it’s not worth bothering with git. You can just create a backup copy of your project folder every now and then.
That’s not good advice to give to beginners, and git isn’t difficult if you bother to learn it
Yep, that’s a very unpopular opinion. I would always suggest to use a version control over many different folders for project backups. I would always use git and an additional backup strategy for the projects on external devices.
Version control was the most effective way to remove the anxiety to break my working code with a feature or refactor.
I wrote a Tutorial for using Git right inside the Godot Editor. It should be fine for your use. It’s old though so if you have any problems, let me know.
@Monday I wouldn’t call it an unpopular opinion. I would call it an uniformed opinion. Because you’ve never lost work due to a hard drive malfunctioning, a virus wiping out files. You’ve never realized a change you made a week ago ended up being a wrong path and you need to go back to an old version and start over.
If you do use Git and you’re dissuading a newbie, then I hope you reconsider how you help other people.
If someone wants to back their stuff up, why would you discourage them? I’ve seen plenty of people give up on development when they lose a project they poured a lot of effort into and never got to the point of looking back and seeing how simple it is to them now in the future.
I’l try learn git then
Newbie game devs have more than enough on their plate. Going on a sidequest to learn git so they can do proper version control for “my-first-videogame-project” is not a good use of their time and energy, is all I’m saying.
(Imo it’s also more likely that they’ll lose their work because they mess up something with git.)
I didn’t say not to backup your work, I’m saying zipping up your project folder is enough, until your project gets more complex. Anyway, not here to argue, but my recommendation is not to worry about git for now.
(edit: maybe I’m wrong about assuming OP is a newbie)
One other thing to consider is GitHub, as its owned by Microsoft and it wouldnt surprise me if they are feeding AI with people’s code.
There are alternatives, whether you trust those either of course is for the birds.
It’s not that hard to learn if you have a tutorial to follow.
No it’s not. Git is always recoverable.
Yeah and that’s horrible advice.
I don’t know that it matters TBH. They said they wanted to learn it because they wanted to backup their project. Maybe let them decide if it’s too complicated for them instead of projecting whatever your first experience was with git onto them?
Oh they are absolutely doing that with all public repos. They announced they were doing that back in 2023 to train Copilot - when that was only the name for their GitHub plugin.
GitLab is a great alternative, but probably the same thing. You get what you pay for. They have to keep the doors open somehow. The alternative is the advertisement mess that is Sourceforge.
I would take a look at Codeberg: (if you want to make it open source)
Is any option free
They are all free.
You asked your question in General so you’re getting a lot more editorial comments than you would have if you’d posted in Help.
If you use git correctly it’s recoverable. There are plenty of destructive git commands. I remember my first attempt to use git I staged some changes with git add then wanted to unstage (in my head remove) a few of those files so I used git rm which deleted the entire file instead, as it was supposed to be the initial commit the files were deleted entirely with no recovery available. Similarly git checkout and restore can delete changes with no recourse.
But did you have to start your entire project over or from your last commit?
If I didn’t have a zip copy I would’ve had to restart the whole project; oh to be young again
Yikes. Well I’m going to go back to: having a good tutorial is needed, and I think I provided that. I still think that’s a better answer than telling people to stay away from git because it’s scary.
Yes totally, sorry to
I do strongly agree that version control, especially git, is a essential tool for developers. Handling local/remote backups and rollbacks is an amazing power.
It is hard to find a good tutorial on git from it’s many starting points (making a new repository or cloning? The ‘official’ ‘short’ tutorial starts by unpacking a tarball), some prefer GUI which would require it’s own tutorial. And of course only harder to find good resources these days with maximal SEO slop.
This guide seems too the point and covers the most basic uses.
Though it does omit unstaging changes which is done through git reset <files>. It must’ve been left out of the tutorial I read years ago too as I looked for how to remove a file in git and ended up with that fateful git rm <very important file> ruining my latest changes and first impression of git. I did have a bad experience, but the tool is something I use every day for the past 15 years since.
I tried to hit the high points in my tutorial I linked above. How to install the Git Plugin for Godot, how to install git, How to make a GitHub account and repo, and how to push code inside the Godot GitHub plugin.