User:Aude/Git

Config
Set global configuration, if only or primarily doing Wikimedia development:

It is important for the email to match your email set in Gerrit, and the name is less important.

Set configuration for individual git repositories:

View global config:

View local config:

If git or gerrit complain about the committer not matching, check the config, and you can also check how your commits are credited:

To commit stuff
or

Update local code
in the morning, do:

Submit code for review
Sanity check:

instead of git push origin, do:

Deleting files
To recursively delete a folder and files:

Branching
Make some changes

merge changes back into develop branch

delete branch

List branches

 * list remote branches

list all branches

Deleting branches
To batch delete branches:

or to force delete branches with "not fully merged" stuff:

Reset
or

View log

 * 37df957 (HEAD, origin/master, origin/HEAD, namespaces, master) selenium: adjusted/extended readme and minor fix in rakefile
 * 1d8956d cleanup of rakefile
 * 080de36 made taskname and target OS in rake configurable via commandline
 * 9bab036 (tag: 2012-26-07) Merge "Adding more GenericArrayObject tests"
 * * 41fcff4 Adding more GenericArrayObject tests
 * | 662f01c fix of recent_changes selenium test
 * |  727541a Merge "Added fixmes, some cleanup and added docs"
 * * | 8a87e58 Added
 * * | 8a87e58 Added
 * * | 8a87e58 Added

Create a patch
make a bunch of changes

Merge conflicts
or set it:

Merge in subsequent commits into a patch
When you have resolved this problem run "git rebase --continue".

Submodules

 * Git - for MediaWiki extensions

Improving a patch
make some changes

Adding a dependency
If you need to amend your patch to have the correct dependency:


 * 1) Resolve conflicts if needed,
 * 2) - use "git status" to see the files that need resolution
 * 3) - after fixing it in your editor, "git add filename" for each of the fixed files


 * 1) * (HEAD, bug/1234) your change
 * 2) * (review/john/700) the dependency
 * 3) * (gerrit/master)

The git push directly will make sure that the dependency is kept and the other revisions that are already in gerrit will not be re-submitted.

Fix a dependency
Change a commit to a new patchset, such as 5a05e0e (5a05e0ef437278eff23c5a8b076b91f0cc7541c8) to cbcd5a0 (cbcd5a08c895d038a3ca7dc10e8d94806e2cae10).

Re-commit your patch replacing the one with the wrong parent

Resubmit to gerrit:

Import github repo into existing empty gerrit repo

 * step 1

Deployment stuff

 * Each deployment, if extensions not at master:
 * https://gerrit.wikimedia.org/r/#/c/37301/ -- mediawiki/tools/release, make-wmf-branch/default.conf (update commit points, if not master)


 * For new extensions
 * https://gerrit.wikimedia.org/r/#/c/37047/ (new extension)
 * https://gerrit.wikimedia.org/r/#/c/37046/ (for new extension)