git-gud/guides/commit.md
2023-11-29 16:23:48 -05:00

37 lines
1.6 KiB
Markdown

# Committing Code and Assets
To submit work to the cloud so other users can see it, you must "commit" your work, then "push" it to the cloud.
## Fetching/Pulling Data
Before you start working however, or committing, it's ideal you pull the latest changes. To do so, simply click this button to "fetch" the cloud data.
![](../assets/commit2.png)
If the button changes and shows an arrow pointing down, that means you do not have the latest changes! Press the button again to "pull" them down. I suggest closing Unreal Engine (or other software) while doing this.
## Making a Commit
On GitHub Desktop, we can see a list of changes we've made to the project. Note the list of added files on the left.
![](../assets/commit1.png)
I added some posters, and a basic poster blueprint. I tested the poster in a level, but did not intend to actually modify the level. You can see this by the first asset I have on the top: `Content\__ExternalActors__\Maps\L_LevelDesignTest\...uasset`. Since I don't want it saved, I'm going to discard the changes by right-clicking on it.
![](../assets/commit3.png)
After that, I verify that the list of changes is correct, add a commit message (so others know what I did), and commit to the repository.
![](../assets/commit4.png)
However, this didn't upload the changes to the repository! To do so, I mush "push" my changes.
![](../assets/commit5.png)
Finally, if you haven't set it up before, GitHub Desktop is going to ask for your credentials. Just use what you log into Gitea with!
![](../assets/commit6.png)
And viola! Your changes should show up in the cloud.
![](../assets/commit7.png)
Thanks for contributing!