I already have a github account and ive made a repository but I dont know how to get by project in the repository. I tried uploading a file but the file size limit stopped me. How do I do this?
Have you installed Git onto your PC? If so, hereās how to use it, using the command terminal in Godot.
To access the terminal, right click on res://
in your scene tree:
Then select Open in Terminal
from the context menu:
and that will open this terminal:
finally you can use the Git commands. Itās recommended to do these commands in this order:
git init
(only do this one the first time, it makes your local repository on your PC)git add .
(adds files to the list that will be added to the repo.the ā.
ā is a wildcard, means it adds all files)git commit -m "insert message here"
(commits the changes you added above changes to your local repo)git push
(uploads your local repo to Github, will probably ask you to sign in)
Once all this is done, you should have a local git repository on your PC with your project files committed to it, and have those files pushed to Github.
The terminal says it does not recognize git. Is there a difference between git and github?
then you likely donāt have it installed. It comes installed by default on Mac and Linux, but you need to set it up manually on Windows. You can download it here: https://git-scm.com/
āGithubā is just a place to store Git repos online: you need Git itself installed to be able to use the site properly.
I installed git and double clicked it in the files. Should I just press next on everything or is there something I should change first.
Default settings should be fine. But please bear in mind Iām no expert on Git or Github, I recommend you reach out to people on a Git-specific community if you want in-depth advice about Git.
is there a specific website you would recommend for reaching out.
Well, thereās a community tab on the Git website, and they have a Discord server too:
If Discord isnāt your style, thereās also their Reddit community:
https://www.reddit.com/r/git/
Try this tutorial I wrote on using Godot with GitHub.
The community I would recommend for asking questions about Git is StackOverflow.
But I happen to know a lot about Git, so if my tutorial doesnāt work for you let me know your problems here first.
I use GitHub Desktop. Itās basically git with UI. Itās easier for a ānon programmerā like me to understand. Maybe you can check that.
Most helpful as I really need to start using it (properly).
100% would recommend Github Desktop as the only tool you need here.
- Create your repo, then select and download it to your local machine.
- Move your project into the repo folder.
- In Github Desktop, right-click on any compiled file and select āgit ignoreā on the whole folder. You donāt want to store any /bin /debug /obj or anything youāve not created.
I do this every day, it works great once you get over a few learning curve issues.
Git has a āstagingā phase, where changes are logged in the local version of the repo, then a second stage where they are āpushedā to the Github repo.
Equally you often need to āfetchā the repo state, then āpullā the content to your local machine. Itās a vital part of large team operations, but likely confusing for solo/beginner setups.
You can easily select Godot as Git ignore option when you first create the repo. So you donāt have to do the third item manually.
Iām curious if you two have tried the GitHub plugin for Godot? Iāve never used GitHub Desktop so I have no frame of reference.
No I never tried the plugin. For two interrelated reasons:
- I had so many issues with the unity git plugin before that I tried to find something that is not a plugin and not bounded by godot.
- Then I figured out GitHub desktop. Extremely easy to use, not a plugin, so no compatibility issues whatsoever for any reason.
Iām a solo developer, so my main use-case is to sync between two different computers I use. And save/revision after I added a feature. For that purpose, desktop version is easy and enough for me.
Fair enough. My tutorial uses the plugin, but Iāve been using command line git for decades and itās what Iām comfortable with. I havenāt tried GitHub desktop in at least a decade, so itās probably better than when I last used it. Does it handle diffs and merge conflicts well?
I donāt know that much as I never needed to deal with those. And I think my use-case is very simple for git.
The only thing I do extra sometiems is stash changes because I decide that changes are not necessary anymore. And desktop can do that.
Also I just checked that you can select/deselect diffs so I assume itāll give you an option to commit those individual diffs in a file.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.