Git commands#
A Git workflow basically has commands that are executed continuously and commands that are needed from time to time.
Timeline commands#
These commands are available in the Timeline.
Push#
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.
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.
Changed Files commands#
These commands are available when clicking on “Changed Files” in the Timeline.
Commit/ Push#
By default, Commit is done implicitly when you press “Push”.
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 changed files and puts them in a cache folder. So you can continue to work on the file, for example, overwrite it, because the committed version is practically secured.
Revert#
A revert resets your files to the last commit. This means that all changed files are removed. This is useful if you have made accidental changes to a project and want to jump back. Be careful with this operation because it cannot be undone.
Revert is often used when you are experimenting on a scene, for example. You download many assets to try out. When committing, you only want to commit the assets that are in the level. You can revert all unused files with this.
Commands on Git versions#
These commands are available when you click on a Git version (also named commit).
Undo Commit#
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 changed files, 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 changed files. If a file has been modified, Undo Commit restores the file to its previous state, creating a changed file. If the changed files are then committed, the old commit has actually been undone.
Restore#
You can restore file versions from any commits. To do this, select a commit in your project. Select the files and choose “Restore” from the context menu. You have two options
Overwrite: Overwrites the current file version with the version from the commit you selected.
Keep Original: Don’t touch the current file version and create a new file with the appendix “_restored”.
Reset Project#
You can reset the entire project to a previous state. Click on a commit and select “Reset Project”. This command works only on repositories with access to remote. You must also have committed all changed files beforehand.
Project Settings commands#
These commands are available in the project settings.
Open Git Console/ Terminal#
Opens a command line application, so you can use any Git commands. This is more suited for programmers or debugging purposes.
Clear Cache#
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.
Update Credentials#
Opens the login interface where you authorize Anchorpoint with the Git hosting provider (GitHub, GitLab, Azure DevOps etc.). This is useful when you e.g. changed your account.