LoginSignup
0
0

More than 3 years have passed since last update.

git

Last updated at Posted at 2018-10-04

spring-integration development guideline https://github.com/spring-projects/spring-integration/blob/master/CONTRIBUTING.adoc

upstreamの設定

git remote add upstream <中央のURL>
git fetch upstream
git branch -a

git fetch

git fetch
git branch -a

remoteのbranchを指定してlocalのbranchをきる

git branch <localの名前> <remoteの名前>/<remoteで取得したいbranchの名前>
git branch feature/jenkins origin/feature/jenkins

rebaseして綺麗にする。

git rebase -i HEAD~~

forkしたやつでPRだしたらconflictを起こした。こういう場合はrebase
* http://dev.toihrk.me/2015/06/02/github-fork-usage.html
* https://qiita.com/KTakata/items/d33185fc0457c08654a5
*

git fetch upstream
(追従したいbranchにいることを確認)
git rebase upstream/<追従したいbranch>

例: issueブランチをupstreamのmasterに追従させたいとき
git fetch -a
git branch -a
git checkout issue
git branch
git rebase upstream/master
git log

PRをlocalにpullしたいとき

git fetch origin pull/ID/head:BRANCHNAME

cf.) https://help.github.com/articles/checking-out-pull-requests-locally/

gitlabのとき

git fetch origin merge-requests/13/head:pr_13
0
0
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
0
0