Skip to content
Cesar Saez edited this page Aug 1, 2013 · 24 revisions

First draft of the documentation, please bear with me on this one...


Preferences

Preferences

Project Settings

  • Project directory: shows softimage active project directory, all the settings below are valid just for this project.
  • Track current project: should be on to take advantage of GitForSoftimage features on this project, otherwise you can only get access to this preferences options.
  • Commit on save: Turn it on if you want to launch GitForSoftimage everytime you save or export a file.
  • Edit .gitignore: We don’t need to version everything in our projects, git will use this rules when looking at files to commit.

Git Settings

This settings has to do with your global settings, notice that this settings are stored locally on your computer, they will be useful later on for authoring your changes.

  • User: Here you should set your Git user name.
  • Email: Your email address, same as before.
  • Status: if Git is correctly installed you should be able to see the git version installed on your sytem (see Set Up Git).

Commits

Commits

Here are 3 key things that you should be aware:

  • List of changes: There's a list with the changes on your project since the last commit (the last time you saved a version), you can easily exclude some changes using the checkboxes on each item. The first characters of each item indicates the change detected (GitForSoftimage will handle this for you).

  • Message: This is a required field and should be used to describe the status of the project, it will be handy later on to identify each commit (see history).

  • Commit: this is quite obvious, when you press the commit button the checked changes are saved on the local repository.

History

History

Here you can query the project history, think about it as your project journal.

When you hit the rollback button, the project contents go back in time to match the commit selected. Notice that when you rollback to a previous version you won't be on the master branch anymore.

If you want to commit changes on top of an older version you should create a new branch and merge it with the master branch (see branches), otherwise just switch to the master branch and your project contents will be restored.

Branches

The Git feature that really makes it stand apart from nearly every other SCM out there is its branching model.

Git allows and encourages you to have multiple local branches that can be entirely independent of each other, more about git branching model here.

Now, back to GitForSoftimage...

Branches

The keys elements here are:

  • You can filter your branches typing its name, if you type a new name and press the checkout button a new branch wil be created.
  • You can switch branches selecting them on the list and pressing the checkout button.
  • You can remove a branch selecting it on the list and pressing the 'X' button.
  • There are a lot of times where you would like to merge 2 branches, you can do that via the merge button.

Working with others

Git doesn't have a central server like Subversion. All of the commands so far have been done locally, just updating a local database. To collaborate with others in Git, you have to put all that data on a server that other people have access to. The way Git does this is to synchronize your data with another repository. There is no real difference between a server and a client - a Git repository is a Git repository and you can synchronize between any two easily.

Generally you will do a number of commits locally, then fetch data from the shared repository to get up to date, merge any new work into the stuff you did, then push your changes back up.

Set Up Remotes

Remotes

Manage your remotes is really easy.

  • You can add remotes pressing the '+' button, set an alias and the location of the remote.
  • You can remove a remote by selecting it on the remotes list and pressing the 'X' button.

Fetch/Push

You can get the latest contents of a remote repo selecting it on the remotes list and pressing the fetch button, it will create a new branch with the contents (you will have to ' manually' merge it, see branches).

Push your changes to another repo is a bit trickier because the branches on non-bare repo (the 'standard' ones) are normally checked out (someone is working on those repos) and git wouldn't allow you to overrride their changes.

So, how to push local changes to a remote git repository? In short: bare repos.

Bare repos

Git provides another type of repo (a simplified one) where push stuff is not an issue (there's no working directory, it's just the database).

GitForSoftimage doesn't offer a way to create this type of repos but as you already have git installed on your system you should be able to it by the following git command.

git init --bare

Then just add it as remote and fetch/push your stuff via GitForSoftimage as usual.


Git Workflows

There are several possible worflows on DVCS, here's a list of interesting articles on the subject: