Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on May 29, 2019. It is now read-only.
/bootstrapPublic archive

Merging a Pull Request

Chris Chua edited this pageApr 6, 2015 ·1 revision

Before you proceed

Setup

These instructions assume that your setup has a remote calledupstream-mergepointing to the angular-ui/bootstrap repository (with push priviledges) and aread-onlyupstream remote from retrieving upstream changes.

This is the recommended setup. However, the instructions will also work if yoursetup only has oneupstream remote. Just replace instances ofupstream-mergewithupstream.

Steps to merge a PR

First lets say you have a PR:https://github.com/angular-ui/bootstrap/pull/1234

  1. First, checkout master, make sure it's up-to-date, and create a branch calledpull/1234:
git checkout mastergit pull upstream mastergit checkout -b pull/1234
  1. Fetch and merge (pull) the PR's commits and merge locally.
git pull --no-edit upstream pull/1234/head

Note the--no-edit option is used to skip editing the merge commitmessage. The reason for this is that there'll be a rebase later to edit themessages anyway and this commit will be discarded during rebase.

  1. Rebase and edit the commits as desired.
git rebase -i master

There are a few things to note here. Mark issues and pull requests that arefixed or closed withFixes #<issue> orCloses #<issue>. A typical commitmessage looks like:

feat(modal): add option to disable animationsNote: Move backdropClass logic into compile function because otherwisemodifying classes in the compile function is broken when using an interpolatedclass attribute.Fixes #1007Closes #2725

The format of the commit message, along with mentioning all the issuesclosed/fixed is important for the changelog script used to updateCHANGELOG.md .

  1. Checkout master and merge your newly rebased branch. Note that thisshouldn't create a merge commit as it's fast-forwarded.
git checkout mastergit merge pull/1234# alternatively: git merge -
  1. Finally, push to upstream. If it's successful, you're done!Please notenever force push to master. It'll break other user's clones of the repository as well as TravisCI.If by this step, the push is rejected, you can either repeat the steps above, or follow the steps below in the next section.
git push upstream-merge master

If your push was rejected

  1. Reset your local master to upstream's master.
git fetch upstream mastergit checkout -B master upstream/master
  1. Rebase your pull request branch on top of your updated local master.
git checkout pull/1234git rebase master
  1. Continue on step 4 in the previous section.

Clone this wiki locally


[8]ページ先頭

©2009-2025 Movatter.jp