This page (revision-1) was last changed on 20-Apr-2024 11:53 by Hiroaki Tateshita

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
20-Apr-2024 11:53 2 KB Hiroaki Tateshita

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 1 added 59 lines
[{PageViewPlugin}]
[GitHub]
!!!Abstract
JSPWikiは本家からフォークしたレポジトリを作りながら、必要な開発を進めています。といいつつ、主にやっているのはプラグイン開発なので、本体をいじったことはほとんどないのですが。ここでは、本家のアップデートをフォークした自分のレポジトリに反映するためのメモです。
!!!Topics
*やりたいこと
本家: git@github.com:apache/jspwiki.git
のアップデートを
自分のレポジトリ: git@github.com:tateshitah/jspwiki.git
に取り込みたい。
*ツール
|SourceTree[1]を使っています。2018年2月18日でバージョンは2.4.8.0でした。
*手順
(1) 本家remoteリポジトリの追加
|自分のリポジトリ上で、リポジトリ設定というダイアログ上で、リモートといタブがあり、リモートリポジトリのパスを追加できます。ここで本家のリポジトリを追加します。そうするとメイン画面の左側にあるリモートという雲のマークがあるところで追加した本家リポジトリを参照することができるようになります。
[{Image src='Merge Origin to folked repository/github_remote_repository_setting.png' width='500'}]
(2) 本家remoteリポジトリのフェッチ
|左のリモートにある本家リポジトリを右クリックするといくつかメニューが出てきますが、その中からフェッチを選びます。まだ自分のリポジトリのファイルに変更は行われません。フェッチには、時間がかかる場合もあります。本家のほうがかなり進んでいれば、その様子が樹形図などでわかるようになります。
フェッチをしたときにこんなエラーが出た場合は、SSHクライアントがPuTTYを使っているためで、こだわりがなければ”ツール”メニューのオプションで、SSHクライアントをOpenSSHにかえましょう。
{{{
git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks fetch --no-tags origin
The server's host key is not cached. You have no guarantee
that the server is the computer you think it is.
The server's ssh-ed25519 key fingerprint is:
ssh-ed25519 255 SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU
If you trust this host, enter "y" to add the key to
エラー終了しました。エラーの内容は上記をご覧ください。
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
connection.
Store key in cache? (y/n, Return cancels connection, i for more info) fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
}}}
(3) 次にマージ
|マージすると、ローカル側のファイルが書き換えられ、その変更部分が表示されるようになります。衝突が起こった場合もここで表示されるはずなので、解決しましょう。
(4) いつものようにコミット+プッシュ
|ローカルで変更されたファイルについて、いつものように内容を確認の上、自分のリポジトリの中で、コミットしてプッシュしましょう。この時点でサーバ側も書き換わります。
!!!Reference
#[#1]SourceTree, [https://ja.atlassian.com/software/sourcetree]
#SourceTreeで、GitHubでFork/cloneしたリポジトリを本家リポジトリに追従する, [https://qiita.com/takanemu/items/a576038f091c850693bc]