差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
softwares:nestdaq:git_forking_workflow [2024/01/29 18:55] – [Troubleshooting] kobayash | softwares:nestdaq:git_forking_workflow [2024/01/29 19:54] (現在) – [Fowking Workflow] kobayash | ||
---|---|---|---|
行 10: | 行 10: | ||
==== Fowking Workflow ==== | ==== Fowking Workflow ==== | ||
- | * ここでは、NestDAQ 本体のソースコードを例にとり、pull request まで出してみる。 | + | * 以下では NestDAQ 本体のソースコードを例にとり、pull request まで出してみる。 |
+ | === 開発環境を整える: | ||
- NestDAQ の Web ページにアクセスする。 | - NestDAQ の Web ページにアクセスする。 | ||
* https:// | * https:// | ||
行 33: | 行 34: | ||
origin https:// | origin https:// | ||
origin https:// | origin https:// | ||
+ | $ git branch | ||
+ | * main | ||
+ | $ git branch -a | ||
+ | * main | ||
+ | remotes/ | ||
+ | remotes/ | ||
+ | $ git branch -r | ||
+ | origin/HEAD -> origin/main | ||
+ | origin/main | ||
</ | </ | ||
- | - さらに、上流の登録をする。さらに、ブランチも一応確認しておく。< | + | - さらに、上流の登録をする。さらに、登録したアドレスを git remote -v コマンドで一応確認しておく。< |
$ git remote add upstream https:// | $ git remote add upstream https:// | ||
$ git remove -v | $ git remove -v | ||
行 46: | 行 56: | ||
Branch ' | Branch ' | ||
</ | </ | ||
+ | - idempiere のページにしたがい、upstreamとの同期する。" | ||
+ | Already on ' | ||
+ | Your branch is up to date with ' | ||
+ | $ git pull upstream main | ||
+ | From https:// | ||
+ | * branch | ||
+ | * [new branch] | ||
+ | Already up to date. | ||
+ | $ git pull origin main | ||
+ | From https:// | ||
+ | * branch | ||
+ | Already up to date. | ||
+ | </ | ||
+ | - 準備完了。 | ||
+ | === ファイルを編集して、commit して自分のリポジトリに push === | ||
+ | - 環境が整ったので、自分のリポジトリでいつもやっているように、commit & push する。 | ||
+ | - 例えば nestdaq/ | ||
+ | elseif(" | ||
+ | message(" | ||
+ | add_compiler_options(-fcolor-diagnostics) | ||
+ | | | | | ||
+ | V V V | ||
+ | elseif(" | ||
+ | message(" | ||
+ | add_compile_options(-fcolor-diagnostics) | ||
+ | </ | ||
+ | - その後、cmake のテストをする。うまくいけば、通常通り commit & push。< | ||
+ | $ git add CMakeLists.txt | ||
+ | $ git commit -m "A typo (add_compiler_options --> add_compile_options) was corrected." | ||
+ | [main 09010b8] A typo (add_compiler_options --> add_compile_options) was corrected. | ||
+ | 1 file changed, 1 insertion(+), | ||
+ | $ git push | ||
+ | Enumerating objects: 5, done. | ||
+ | Counting objects: 100% (5/5), done. | ||
+ | Delta compression using up to 8 threads | ||
+ | Compressing objects: 100% (3/3), done. | ||
+ | Writing objects: 100% (3/3), 335 bytes | 335.00 KiB/s, done. | ||
+ | Total 3 (delta 2), reused 0 (delta 0), pack-reused 0 | ||
+ | remote: Resolving deltas: 100% (2/2), completed with 2 local objects. | ||
+ | To https:// | ||
+ | | ||
+ | </ | ||
+ | - これで push 完了。次はプルリク。 | ||
+ | === 上流にプルリクを出す === | ||
+ | - 修正を上流にマージしてほしい場合は、pull requests を出す | ||
+ | - ブラウザーで自分のリポジトリにアクセスする | ||
+ | * https:// | ||
+ | - 左上あたりの Pull requests ボタン {{: | ||
+ | - 以下のような画面に飛ぶ。ここで、緑の New pull request ボタンを出す。 \\ {{: | ||
+ | - ここで、緑の Create pull request ボタンを出す。 \\ {{: | ||
+ | - Add a description でコメントを編集し、緑の Create pull request ボタンを出す。 \\ {{: | ||
+ | - 以下のような画面に飛ぶ。プルリクが承認されると、また見え方が変わるはず。 \\ {{: | ||
+ | |||
==== Troubleshooting ==== | ==== Troubleshooting ==== | ||
* https:// | * https:// | ||
行 55: | 行 118: | ||
origin https:// | origin https:// | ||
origin https:// | origin https:// | ||
- | </ | + | </ |
+ | $ git remove -v | ||
+ | origin https:// | ||
+ | origin https:// | ||
+ | upstream https:// | ||
+ | upstream https:// | ||
$ git branch --set-upstream-to=origin/ | $ git branch --set-upstream-to=origin/ | ||
error: the requested upstream branch ' | error: the requested upstream branch ' |