LoginSignup
1
3

More than 5 years have passed since last update.

githubで別ユーザーのPullRequestを取り込む

Posted at

Twitter4Jの他の人のPullRequestを取り込みたかったのでやり方を調べてやってみた。

上記を参考に、っつーかそのままなんだけど。

取り込みたいPRはコレ↓

このPRに該当するbranchはコレ↓

というわけで作業してみた

$ git remote -v
origin  git@github.com:takke/twitter4j.git (fetch)
origin  git@github.com:takke/twitter4j.git (push)
upstream        https://github.com/yusuke/twitter4j.git (fetch)
upstream        https://github.com/yusuke/twitter4j.git (push)

$ git remote add akihito104 git@github.com:akihito104/twitter4j.git

$ git remote -v
akihito104      git@github.com:akihito104/twitter4j.git (fetch)
akihito104      git@github.com:akihito104/twitter4j.git (push)
origin  git@github.com:takke/twitter4j.git (fetch)
origin  git@github.com:takke/twitter4j.git (push)
upstream        https://github.com/yusuke/twitter4j.git (fetch)
upstream        https://github.com/yusuke/twitter4j.git (push)

$ git fetch akihito104
remote: Counting objects: 8, done.
remote: Total 8 (delta 2), reused 2 (delta 2), pack-reused 6
Unpacking objects: 100% (8/8), done.
From github.com:akihito104/twitter4j
 * [new branch]      2.0.x      -> akihito104/2.0.x
 * [new branch]      2.1.x      -> akihito104/2.1.x
 * [new branch]      2.2.x      -> akihito104/2.2.x
 * [new branch]      TFJ-671    -> akihito104/TFJ-671
 * [new branch]      TFJ-679-api1.1 -> akihito104/TFJ-679-api1.1
 * [new branch]      master     -> akihito104/master
 * [new branch]      revert-171-TFJ-806 -> akihito104/revert-171-TFJ-806
 * [new branch]      work       -> akihito104/work

$ git merge --no-ff akihito104/work
Merge made by the 'recursive' strategy.
 twitter4j-stream/src/main/java/twitter4j/StatusStreamBase.java | 1 +
 1 file changed, 1 insertion(+)

$ git push
Counting objects: 10, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (10/10), 908 bytes | 0 bytes/s, done.
Total 10 (delta 4), reused 0 (delta 0)
To git@github.com:takke/twitter4j.git
   8a03113..5a0e5bd  master -> master

結果はこんな感じ

1
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
3