Gerrit/Tutorial

Right now Git/Workflow is a better tutorial - this page is to develop a good step-by-step tutorial for the Berlin Hackathon 2012.

Who Might Want to Use this Tutorial
You might be interested in this tutorial if... It's purpose is to...

What is Git?
Git is a distributed version control system (dvcs) written in C. A version control system allows the creation of a history for a collection of files and includes the functionality to revert the collection of files to another state. Another state might be a different collection of files or different content in the files.

You may, for example, change the collection of files to a state from 2 days ago or you may switch between states for experimental features and production issues.

The collection of files is usually called "source code". In a distributed version control system everyone has a complete copy of the source code (including the complete history of the source code) and can perform version control operations against this local copy. The use of a dvcs does not require a central code repository.

If you make changes to the source code you mark them as relevant for the version control (add them to the index / staging) and then add them to the repository (commit).

Git maintains all versions. Therefore you can revert to any point in your source code history using Git.

Git performs commits to your local repository and you can synchronize your repository with other (remote) repositories. Git allows you to clone repositories, e.g. create an exact copy of a repository including the complete history of the source code. Owners of repositories can synchronize changes via push (transferring changes to a remote repository) or pull (getting changes from a remote repository).

Git supports branching, e.g. you can have different versions of your source code. If you want to develop a new feature, you may open a branch in your source code and make the changes in this branch without affecting the main line of your code.

Git can be used from the command line; this approach will be described in this tutorial. You also find graphical tools, for example EGit for the Eclipse IDE, but these tools will not be described in this tutorial.

Basics
On Ubuntu you can install the Git command line tool via the following command: sudo apt-get install git-core For other Linux distributions please check your vendor documentation.
 * Intro: brief history of conversion, biz case for it and implementation phases/where we are now.
 * | Why and How We Converted from Subversion to Git
 * Demo of setting up Git
 * General Git distro info
 * Installation

A windows version of Git can be found on the msysgit Project site.

The URL to this webpage is http://code.google.com/p/msysgit/.


 * Using Git: How to Download, Clone Core
 * Use the most recent Release-Upgrade for current security and new features
 * Category:MediaWiki Releases
 * MW Release Notes
 * submitting a patch
 * commenting on a patch in Gerrit
 * merging a patch in Gerrit

Collaborating

 * Gerrit project ownership - brief mention that there is a commit/abandon and how they can qualify for the permissions to do this.
 * something got tagged - what does that mean?
 * branching
 * local branch, making, working & pushing
 * remote branch & git-review to that remote branch
 * | Git Review
 * quick overview/invitation to building your review skills
 * | Installing Git Review tool
 * Code Review process
 * | Old SVN Code Review article

Troubleshooting

 * cherrypick changes between branches
 * amending (rebase vs multiple commit)
 * | Managing Conflicts in Gerrit Repo (Merge or Rebase)
 * | Rebasing, empty commits, empty cherry picks
 * squashing work from a branch into a commit and pushing it
 * resolve merge conflicts

Deployment
If we have time to discuss.

Collection of Helpful Git/Gerrit Resource (please add to and incorporate these articles)
Old SVN download article
 * Localization: are these incorporated yet?
 * Is this bug fix incorporated in all MW Git/Gerrit documentation?
 * Git_notes_-_NOLA_Hackathon_2011.oga
 * Git_notes_-_NOLA_Hackathon_2011.pdf
 * Git Notes from NOLA hackathon - good distillation; only inaccuracies are around submits and Git review tool.