Open main menu

Git tips

Revision as of 13:39, 12 February 2011 by Salty-horse (talk | contribs) (Start the Git tips page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The following is a list of tips, do's and dont's for working with the ScummVM git repositores, compared to working with Subversion.

Organization

Development is done on the master branch, which is equivalent the the old Subversion trunk. Release branches are branched from, and merged to, master. Tags are always annotated (git tag -a) in order to include a timestamp.

Dont's

  • Never ever use git push -f without discussing it on the mailing-list. That operation deletes commits from the server, and will cause problems to others working with the repository.
  • Try to not create pointless merge commits. This will be explain in the #Workflow section. If you do make merge commits, the branch you're merging should include commits that are "bunched together" on purpose. This makes them easier to review or revert.

Workflow

There are several ways to work with git. Here we'll discuss two: You could make your commits on the master branch, or you could make them on a separate branch, called a topic branch and then merge them into the master branch, before pushing. We'll cover the basics of pushing first

How to push changes

The important thing to realize is that when pushing changes to the remote server (aka "origin"), your changes must be based on the remote server. Subversion allowed you, in some cases, to commit without having the most up-to-date working copy. Git doesn't.

TODO

Branchy development

TODO