Godot Version
‘4.4’
Question
`Hey there, I wanna know how to git my GODOT game through Terminal/termux , whatsoever you say… is there even a safe and always accessible way to do so ? Like can we even access our uploaded git from other devices cia terminal/termux ???’
I’m not really sure what you want to know. I feel like you’re asking about how to use git, so I’ll try to answer that:
git
is by default a tool used via a command line . Here’s a quick overview:
You usually have some central place that hosts your repository, where the project is stored. If you don’t want to host it yourself, Github or Gitlab are popular hosters.
To access the repository, you at least need to have git installed. If you have git already installed, git -v
will print you the current version number. Otherwise just search for “how to install git for [your terminal app]”.
To get a copy of the repository on your local device, you use
git clone [repository-url]
If you e.g. use Github as hoster, you find that url on the repository page via the Code
button, https or ssh links should work.
Here are some commands used for synchronization:
git commit
- add a new commit (~ a set of file changes) that will by synchronized to the repository once you push, you can specify which files to commit
git push
- synchronizes all the local commits with the remote repository
git fetch
- collect the info for all new commits from the remote repository
git pull
- synchronizes the new commits from the remote to your local machine
This is very simplified, there are a lot of further commands and features. You’ll find better tutorials than this online.
1 Like
I am actually asking about the real commands , here is the simplified question---->
“How can I git my godot game via Terminal like Linux terminal , Ubuntu Terminal etc or simply any terminal” That is all.
Why Terminal ??? ---->
I wanna git through terminal as @HexGrid named person was talking about terminal git and he mentioned one thing that the Terminal git is opensource and is more safer compared to Github or other third party gits.
To access it from other device you need to share folder to network or have remote repository which will come with many merging for one at the time , this was solved by GitHub .
You can use plugin or VSCode to control and commit to your git repository locally , in VSCode is feature to setup remote access but then you would need to have online or lan connected to access it from other device .
There exist other methods of source control but be fair for most of user GitHub is fine as provides private and public repository free of charge .
1 Like
Just to help you make a decision:
git
is a software that is the basis for most distributed version control you will find. GitHub, Gitea, GitLab… everything is git
.
- accessing any
git
via terminal is simple, you can find information about that here:
Git - Documentation
If you use GitHub as your Host, just use their Desktop Software. There is virtually no difference in terms of privacy and security between their desktop client and a cli(terminal) access.
But if you want to use cli → Set up Git - GitHub Docs
You can also use one of the other hosting services if they suit your privacy/sec demand more.
You can, after all, also set up your own git server. Depending on your hardware and infrastructure this can be more private, just as secure and maybe even as reliable. But probably just the first.
3 Likes
Just to clear up confusion:
git - Terminal is not an alternative to Github or any of its competitors. It is an alternative to the Github desktop app, which as @ximossi pointet out is not a huge privacy issue. But if you dont trust Microsoft there are several open source alternatives to Github Desktop with a ui.
But what is Github if it is not a git alternative?
Github is a online file host. It stores your files on their serves to allow you and others to access them. you can use git remote add ...
inside of git terminal to automatically sink your local git repository with the online one hosted by Github.
So the real question is what do you want?
Do you only want the version managment powers that git has? This includes stuff like moving back to earlier development stages, undoing or redoing changes and much more.
This does not include:
Automatically syncing your Projects (repositories) across devices and allowing multiple people to work on them simultaneously. For this you need some kind of Host.
Dont trust Github? Maybe consider alternative hosts like CodeBerg.
Dont trust those other hosts either? Consider self hosting.
This is a deep rabbit hole and probably not what you are looking for if you are asking for something simple.
If you want something simple and don’t trust Microsoft i would suggest for you to use
Codeberg + your Terminal.
1 Like
What I do personally is:
I have a NAS:
- “Network Attached Storage”, basically a small-CPU PC with a giant pile of hard disk space
- it’s running Linux, though other OSs would work; mine’s an off-the-shelf model that came with Linux
- the NAS is called
chrysophylax
When I want to start a new project, I typically:
- use
ssh
to get into the NAS:
cd repos
git init --bare NewProjectName
. I keep my repos in /home/me/repos
.
On my dev boxes, I do:
cd Projects
git clone me@chrysophylax:repos/NewProjectName
The repo should clone into ./NewProjectName
, at which point it’s ready for you to do stuff with it. When you’ve made some changes, you can:
git status
– will tell you what changed and what’s ready for commit
git diff
– gives you a diff between the current state and the last commit
git difftool -d
– same as git diff
, but feeds it to a tool you chose
git log
– will tell you what changes happened in the past
git add
– add some of the current changes to the next commit
git commit
– bake the current commit – after this it will be the top item in git log
git push
– push the current commit back to the origin, which in my case would be chrysophylax
git pull
– get the latest changes from the origin
There’s more, but 99% of the time you’ll be using those. My typical workflow is:
git pull
– get what changed
- write code
git difftool -d
– see if I’m happy with my changes
git commit -a
– add and commit all changes
git push
I can then go to another dev box and git pull
to get the new code.
1 Like