| Feb | MAR | Apr |
| 07 | ||
| 2014 | 2015 | 2016 |
COLLECTED BY
Collection: Alexa Crawls
git config --global user.name "Firstname Lastname" git config --global user.email "your_email@youremail.com"To check your git configuration:
git config --list
apt-get install git-reviewOn Fedora 16 and later, git-review is included into the distribution, so install it as any other package:
yum install git-reviewOn Red Hat Enterprise Linux, you must first enable the EPEL repository, then install it as any other package:
yum install git-reviewOn openSUSE 12.2 and later, git-review is included in the distribution under the name python-git-review, so install it as any other package:
zypper in python-git-reviewOn Mac OS X, or most other Unix-like systems, you may install it with pip:
pip install git-reviewIf you run into trouble, you can refer to the git-review readme file. All of git-review’s interactions with gerrit are sequences of normal git commands. If you want to know more about what it’s doing, just add -v to the options and it will print out all of the commands it’s running.
git clone https://git.openstack.org/openstack/nova.gitYou may want to ask git-review to configure your project to know about Gerrit at this point. If you don’t, it will do so the first time you submit a change for review, but you probably want to do this ahead of time so the Gerrit Change-Id commit hook gets installed. To do so (again, using Nova as an example):
cd nova git review -sGit-review checks that you can log in to gerrit with your ssh key. It assumes that your gerrit/launchpad user name is the same as the current running user. If that doesn’t work, it asks for your gerrit/launchpad user name. You can avoid that question by configuring git to use your Gerrit username, as follows:
git config --global gitreview.username yourgerritusernameIf you don’t remember your Gerrit user name go to the settings page on gerrit to check it out (it’s not your email address). Note You can verify the SSH host keys for review.openstack.org on https://review.openstack.org/#/settings/ssh-keys
Closes-Bug: ####### Partial-Bug: ####### Related-Bug: #######Also see the Including external references section of the OpenStack Git Commit Good Practices wiki page.
specs/<release>/It may also have subdirectories to make clear which specifications are approved and which have already been implemented: specs/<release>/approved specs/<release>/implemented You can typically find an example spec in specs/template.rst. Check the repository for the project team you’re working on for specifics about repository organization. Specifications are proposed for a given release by adding them to the specs/<release> directory and posting it for review. The implementation status of a blueprint for a given release can be found by looking at the blueprint in Launchpad. Not all approved blueprints will get fully implemented. Specifications have to be re-proposed for every release. The review may be quick, but even if something was previously approved, it should be re-reviewed to make sure it still makes sense as written. Historically, Launchpad blueprints were used to track the implementation of these significant features and changes in OpenStack. For many project teams, these Launchpad blueprints are still used for tracking the current status of a specification. For more information, see the Blueprints wiki page. View all approved project team’s specifications at http://specs.openstack.org/.
git remote update git checkout master git pull --ff-only origin masterCreate a topic branch to hold your work and switch to it. If you are working on a blueprint, name your topic branch bp/BLUEPRINT where BLUEPRINT is the name of a blueprint in launchpad (for example, bp/authentication). The general convention when working on bugs is to name the branch bug/BUG-NUMBER (for example, bug/1234567). Otherwise, give it a meaningful name because it will show up as the topic for your change in Gerrit:
git checkout -b TOPIC-BRANCH
Implements: blueprint BLUEPRINT Closes-Bug: ####### (Partial-Bug or Related-Bug are options)For example:
Adds keystone support ...Long multiline description of the change... Implements: blueprint authentication Closes-Bug: #123456 Change-Id: I4946a16d27f712ae2adf8441ce78e6c0bb0bb657Note that in most cases the Change-Id line should be automatically added by a Gerrit commit hook installed by git-review. If you already made the commit and the Change-Id was not added, do the Gerrit setup step and run: git commit --amend. The commit hook will automatically add the Change-Id when you finish amending the commit message, even if you don’t actually make any changes. Do not change the Change-Id when amending a change as that will confuse Gerrit. Make your changes, commit them, and submit them for review:
git commit -aNote Do not check in changes on your master branch. Doing so will cause merge commits when you pull new upstream changes, and merge commits will not be accepted by Gerrit.
git reviewWhen that completes, automated tests will run on your change and other developers will peer review it.
git commit -a --amend git review
git checkout master git pull origin master git checkout TOPIC-BRANCH git rebase -i masterUse the editor to squash any commits that should not appear in the public history. If you want one change to be submitted to Gerrit, you should only have one “pick” line at the end of this process. After completing this, you can prepare your public commit message(s) in your editor. You start with the commit message from the commit that you picked, and it should have a Change-Id line in the message. Be sure to leave that Change-Id line in place when editing. Once the commit history in your branch looks correct, run git review to submit your changes to Gerrit.
git review -d $PARENT_CHANGE_NUMBER git checkout -b $DEV_TOPIC_BRANCHEdit files, add files to git:
git commit -a git reviewNote git review rebases the existing change (the dependency) and the new commit if there is a conflict against the branch they are being proposed to. Typically this is desired behavior as merging cannot happen until these conflicts are resolved. If you don’t want to deal with new patchsets in the existing change immediately you can pass the -R option to git review in the last step above to prevent rebasing. This requires future rebasing to resolve conflicts. If the commit your work depends on is updated, and you need to get the latest patchset from the depended commit, you can do the following. Fetch and checkout the parent change:
git review -d $PARENT_CHANGE_NUMBERCherry-pick your commit on top of it:
git review -x $CHILD_CHANGE_NUMBERSubmit rebased change for review:
git reviewThe note for the previous example applies here as well. Typically you want the rebase behavior in git review. If you would rather postpone resolving merge conflicts you can use git review -R as the last step above.
Enter search terms or a module, class or function name.