<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://home.stridr.biz/index.php?action=history&amp;feed=atom&amp;title=Godot_Git_Setup</id>
	<title>Godot Git Setup - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://home.stridr.biz/index.php?action=history&amp;feed=atom&amp;title=Godot_Git_Setup"/>
	<link rel="alternate" type="text/html" href="https://home.stridr.biz/index.php?title=Godot_Git_Setup&amp;action=history"/>
	<updated>2026-06-21T23:58:37Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.4</generator>
	<entry>
		<id>https://home.stridr.biz/index.php?title=Godot_Git_Setup&amp;diff=45&amp;oldid=prev</id>
		<title>Nathans1987: Created page with &quot;&lt;br /&gt;  = Godot + Git + Gitea Project Template (Linux) = A reusable workflow for setting up a new Godot project with Git and pushing it to a blank Gitea repository using HTTPS...&quot;</title>
		<link rel="alternate" type="text/html" href="https://home.stridr.biz/index.php?title=Godot_Git_Setup&amp;diff=45&amp;oldid=prev"/>
		<updated>2026-05-17T12:57:40Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;br /&amp;gt;  = Godot + Git + Gitea Project Template (Linux) = A reusable workflow for setting up a new Godot project with Git and pushing it to a blank Gitea repository using HTTPS...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Godot + Git + Gitea Project Template (Linux) =&lt;br /&gt;
A reusable workflow for setting up a new Godot project with Git and pushing it to a blank Gitea repository using HTTPS.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
Before starting:&lt;br /&gt;
&lt;br /&gt;
* Git is installed (&amp;lt;code&amp;gt;git --version&amp;lt;/code&amp;gt;)&lt;br /&gt;
* A Godot project already exists&lt;br /&gt;
* A blank repository has been created in Gitea&lt;br /&gt;
* You are inside your Godot project folder in terminal&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;lt;code&amp;gt;git --version&lt;br /&gt;
 pwd&lt;br /&gt;
 ls&amp;lt;/code&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Initial Project Setup =&lt;br /&gt;
&lt;br /&gt;
== 1. Initialize Git Repository ==&lt;br /&gt;
 &amp;lt;code&amp;gt;git init&amp;lt;/code&amp;gt;&lt;br /&gt;
'''What it does:'''&lt;br /&gt;
&lt;br /&gt;
* Creates a hidden &amp;lt;code&amp;gt;.git&amp;lt;/code&amp;gt; folder&lt;br /&gt;
* Turns the current folder into a Git repository&lt;br /&gt;
* Starts tracking version history&lt;br /&gt;
&lt;br /&gt;
Useful when:&lt;br /&gt;
&lt;br /&gt;
* Starting any new project&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== 2. Create Godot &amp;lt;code&amp;gt;.gitignore&amp;lt;/code&amp;gt; ==&lt;br /&gt;
 &amp;lt;code&amp;gt;cat &amp;gt; .gitignore &amp;lt;&amp;lt; 'EOF'&lt;br /&gt;
 .godot/&lt;br /&gt;
 .import/&lt;br /&gt;
 .export/&lt;br /&gt;
 export_presets.cfg&lt;br /&gt;
 EOF&amp;lt;/code&amp;gt;&lt;br /&gt;
'''What it does:'''&lt;br /&gt;
&lt;br /&gt;
* Creates a &amp;lt;code&amp;gt;.gitignore&amp;lt;/code&amp;gt; file&lt;br /&gt;
* Prevents machine-generated or temporary files being committed&lt;br /&gt;
&lt;br /&gt;
=== Ignored files explained ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;.godot/&amp;lt;/code&amp;gt; → Godot 4 cache/import data&lt;br /&gt;
* &amp;lt;code&amp;gt;.import/&amp;lt;/code&amp;gt; → legacy import cache&lt;br /&gt;
* &amp;lt;code&amp;gt;.export/&amp;lt;/code&amp;gt; → export temp files&lt;br /&gt;
* &amp;lt;code&amp;gt;export_presets.cfg&amp;lt;/code&amp;gt; → local export settings&lt;br /&gt;
&lt;br /&gt;
Why ignore these:&lt;br /&gt;
&lt;br /&gt;
* Reduces repo size&lt;br /&gt;
* Avoids merge conflicts&lt;br /&gt;
* Keeps commits clean&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== 3. Stage All Files ==&lt;br /&gt;
 &amp;lt;code&amp;gt;git add .&amp;lt;/code&amp;gt;&lt;br /&gt;
'''What it does:'''&lt;br /&gt;
&lt;br /&gt;
* Adds all current files to the staging area&lt;br /&gt;
* Prepares them for commit&lt;br /&gt;
&lt;br /&gt;
Think of staging as:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;These are the files I want included in the next snapshot&amp;quot;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== 4. First Commit ==&lt;br /&gt;
 &amp;lt;code&amp;gt;git commit -m &amp;quot;Initial commit&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
'''What it does:'''&lt;br /&gt;
&lt;br /&gt;
* Saves a snapshot of staged files into project history&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-m&amp;lt;/code&amp;gt; means message.&lt;br /&gt;
&lt;br /&gt;
Good commit messages:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;Add player movement&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;Implement inventory system&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;Fix wall jump bug&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bad commit messages:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;stuff&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;update&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;asdf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Future you will thank present you.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== 5. Add Remote Repository ==&lt;br /&gt;
 &amp;lt;code&amp;gt;git remote add origin &amp;lt;nowiki&amp;gt;https://your-gitea-domain.com/username/repository.git&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
Replace URL with your Gitea repo URL.&lt;br /&gt;
&lt;br /&gt;
'''What it does:'''&lt;br /&gt;
&lt;br /&gt;
* Links local project to remote Gitea repo&lt;br /&gt;
&lt;br /&gt;
Definitions:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;origin&amp;lt;/code&amp;gt; = nickname for remote server&lt;br /&gt;
&lt;br /&gt;
Check remotes:&lt;br /&gt;
 &amp;lt;code&amp;gt;git remote -v&amp;lt;/code&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== 6. Set Main Branch + Push ==&lt;br /&gt;
 &amp;lt;code&amp;gt;git branch -M main&lt;br /&gt;
 git push -u origin main&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;git branch -M main&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
* Renames current branch to &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;git push -u origin main&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
* Uploads commits to remote&lt;br /&gt;
* &amp;lt;code&amp;gt;-u&amp;lt;/code&amp;gt; sets upstream so future pushes only need &amp;lt;code&amp;gt;git push&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After first push:&lt;br /&gt;
 &amp;lt;code&amp;gt;git push&amp;lt;/code&amp;gt;&lt;br /&gt;
is enough.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Save HTTPS Credentials (Optional but recommended) =&lt;br /&gt;
 &amp;lt;code&amp;gt;git config --global credential.helper store&amp;lt;/code&amp;gt;&lt;br /&gt;
'''What it does:'''&lt;br /&gt;
&lt;br /&gt;
* Saves HTTPS username/password or token locally after first login&lt;br /&gt;
&lt;br /&gt;
Benefits:&lt;br /&gt;
&lt;br /&gt;
* No repeated login prompts&lt;br /&gt;
&lt;br /&gt;
Stored in:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;~/.git-credentials&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Security note:&lt;br /&gt;
&lt;br /&gt;
* Stored in plain text&lt;br /&gt;
* Fine for personal Linux machine&lt;br /&gt;
* Less ideal on shared computers&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Daily Workflow / Future Commits =&lt;br /&gt;
After making changes:&lt;br /&gt;
 &amp;lt;code&amp;gt;git add .&lt;br /&gt;
 git commit -m &amp;quot;Describe changes&amp;quot;&lt;br /&gt;
 git push&amp;lt;/code&amp;gt;&lt;br /&gt;
Typical workflow:&lt;br /&gt;
&lt;br /&gt;
# Code&lt;br /&gt;
# Test&lt;br /&gt;
# Commit&lt;br /&gt;
# Push&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Branching =&lt;br /&gt;
Useful for testing features safely.&lt;br /&gt;
&lt;br /&gt;
== Create new branch ==&lt;br /&gt;
 &amp;lt;code&amp;gt;git checkout -b feature-double-jump&amp;lt;/code&amp;gt;&lt;br /&gt;
'''What it does:'''&lt;br /&gt;
&lt;br /&gt;
* Creates branch&lt;br /&gt;
* Switches to it immediately&lt;br /&gt;
&lt;br /&gt;
Now you can experiment without touching main.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Switch branches ==&lt;br /&gt;
 &amp;lt;code&amp;gt;git checkout main&amp;lt;/code&amp;gt;&lt;br /&gt;
or:&lt;br /&gt;
 &amp;lt;code&amp;gt;git checkout feature-double-jump&amp;lt;/code&amp;gt;&lt;br /&gt;
Moves between branches.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== View branches ==&lt;br /&gt;
 &amp;lt;code&amp;gt;git branch&amp;lt;/code&amp;gt;&lt;br /&gt;
Current branch has &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;lt;code&amp;gt;* main&lt;br /&gt;
   feature-double-jump&amp;lt;/code&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Merge branch into main ==&lt;br /&gt;
Switch to main first:&lt;br /&gt;
 &amp;lt;code&amp;gt;git checkout main&amp;lt;/code&amp;gt;&lt;br /&gt;
Merge:&lt;br /&gt;
 &amp;lt;code&amp;gt;git merge feature-double-jump&amp;lt;/code&amp;gt;&lt;br /&gt;
This combines work into main.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Delete merged branch ==&lt;br /&gt;
 &amp;lt;code&amp;gt;git branch -d feature-double-jump&amp;lt;/code&amp;gt;&lt;br /&gt;
Keeps repo tidy.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Useful Commands =&lt;br /&gt;
&lt;br /&gt;
== Check status ==&lt;br /&gt;
 &amp;lt;code&amp;gt;git status&amp;lt;/code&amp;gt;&lt;br /&gt;
Shows:&lt;br /&gt;
&lt;br /&gt;
* modified files&lt;br /&gt;
* staged files&lt;br /&gt;
* current branch&lt;br /&gt;
&lt;br /&gt;
Most used Git command.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== View commit history ==&lt;br /&gt;
 &amp;lt;code&amp;gt;git log --oneline&amp;lt;/code&amp;gt;&lt;br /&gt;
Compact history view.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;lt;code&amp;gt;4f8a1d2 Add dash mechanic&lt;br /&gt;
 2a8c114 Initial commit&amp;lt;/code&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== See changed files ==&lt;br /&gt;
 &amp;lt;code&amp;gt;git diff&amp;lt;/code&amp;gt;&lt;br /&gt;
Shows unstaged changes.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Undo unstaged changes ==&lt;br /&gt;
 &amp;lt;code&amp;gt;git restore filename&amp;lt;/code&amp;gt;&lt;br /&gt;
Danger: discards local edits.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Unstage file ==&lt;br /&gt;
 &amp;lt;code&amp;gt;git restore --staged filename&amp;lt;/code&amp;gt;&lt;br /&gt;
Removes from staging without deleting changes.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Recommended Solo Dev Workflow for Godot =&lt;br /&gt;
For small solo projects:&lt;br /&gt;
&lt;br /&gt;
* Commit often&lt;br /&gt;
* Push daily or after milestones&lt;br /&gt;
* Use branches for risky features&lt;br /&gt;
* Keep &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; stable/playable&lt;br /&gt;
&lt;br /&gt;
Example branch naming:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;feature-inventory&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;feature-wall-jump&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;bugfix-animation&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;refactor-state-machine&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Quick Reference Cheat Sheet =&lt;br /&gt;
 &amp;lt;code&amp;gt;git add .&lt;br /&gt;
 git commit -m &amp;quot;message&amp;quot;&lt;br /&gt;
 git push&lt;br /&gt;
 &lt;br /&gt;
 git checkout -b new-branch&lt;br /&gt;
 git checkout main&lt;br /&gt;
 git merge branch-name&lt;br /&gt;
 &lt;br /&gt;
 git status&lt;br /&gt;
 git branch&lt;br /&gt;
 git log --oneline&amp;lt;/code&amp;gt;&lt;br /&gt;
----End of template.&lt;/div&gt;</summary>
		<author><name>Nathans1987</name></author>
		
	</entry>
</feed>