A Git workflow basically has commands that are executed continuously and commands that are needed from time to time. Since Git is an explicit system, so it doesn’t automatically sync files (e.g. like Dropbox) you need the following commands on a daily basis to work together:
Common Git commands#
This will “freeze” the file versions. A commit is so to speak a version of the project, so a kind of checkpoint. When committing, Anchorpoint duplicates the files in the Uncommitted Changes and puts them in a cache folder. So you can continue to work on the file, for example, overwrite it, because the committede version is practically secured.
The push uploads the commits (i.e. the project checkpoints) to the server. Once they are uploaded, the team can download them via a pull.
The pull downloads commits from the server. After the pull, you are up to date. The pull also happens explicitly, so you can’t break anything while working. If a commit has caused problems (e.g. the level in the game engine no longer loads), it can be undone via Undo Commit.
Other Git commands#
As the project progresses, it often happens that you want to roll back a commit (i.e. a project version). Undo Commit does a “reverse” operation. It does not delete the commit directly, but it creates uncommitted changes, which cause exactly the opposite. If new files were added in the commit, Undo Commit removes them. They then show up as removed files in the Uncommitted Changes. If a file has been modified, Undo Commit restores the file to its previous state, creating an Uncommitted Change. If the Uncommitted Changes are then committed, the old commit has actually been undone.
The Clear Cache option can be found in the Git Settings. It deletes old versions from the hard disk, but not from the server. For example, if you have a file with 3 Git versions, the first two are removed and the last version remains. If you want to jump back to version 2 (e.g. you make an undo commit to version 3) Anchorpoint will download version 2 from the server again.