差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
softwares:nestdaq:git_forking_workflow [2024/01/29 19:08] – [Fowking Workflow] kobayashsoftwares:nestdaq:git_forking_workflow [2024/01/29 19:54] (現在) – [Fowking Workflow] kobayash
行 10: 行 10:
  
 ==== Fowking Workflow ==== ==== Fowking Workflow ====
-  * ここではNestDAQ 本体のソースコードを例にとり、pull request まで出してみる。+  * 以下では NestDAQ 本体のソースコードを例にとり、pull request まで出してみる。
 === 開発環境を整える: フォークして、手元のPCにクローンして、上流と同期 === === 開発環境を整える: フォークして、手元のPCにクローンして、上流と同期 ===
   - NestDAQ の Web ページにアクセスする。   - NestDAQ の Web ページにアクセスする。
行 44: 行 44:
   origin/main   origin/main
 </code> </code>
-  - さらに、上流の登録をする。さらに、ブラチも一応確認しておく。<code>+  - さらに、上流の登録をする。さらに、登録したアドレスを git remote -v コマドで一応確認しておく。<code>
 $ git remote add upstream https://github.com/spadi-alliance/nestdaq.git $ git remote add upstream https://github.com/spadi-alliance/nestdaq.git
 $ git remove -v $ git remove -v
行 70: 行 70:
 </code> </code>
   - 準備完了。   - 準備完了。
-=== ファイルを編集して、commit して 自分のリポジトリに push === +=== ファイルを編集して、commit して自分のリポジトリに push === 
-  - +  - 環境が整ったので、自分のリポジトリでいつもやっているように、commit & push する。 
 +  - 例えば nestdaq/CMakeLists.txt のタイポを直してみる。エディタで nestdaq/CMakeLists.txt ファイルの12-14行目を以下のように編集する。 (14行目の add_compiler_options がtypo、正しくは add_compile_options。)<code> 
 +elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"
 +  message("turn on colored error message of Clang"
 +  add_compiler_options(-fcolor-diagnostics) 
 +           | | | 
 +           V V V 
 +elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"
 +  message("turn on colored error message of Clang"
 +  add_compile_options(-fcolor-diagnostics) 
 +</code> 
 +  - その後、cmake のテストをする。うまくいけば、通常通り commit & push。<code> 
 +$ 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(+), 1 deletion(-) 
 +$ 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://github.com/nobukoba/nestdaq.git 
 +   4dae50f..09010b8  main -> main 
 +</code> 
 +  - これで push 完了。次はプルリク。 
 +=== 上流にプルリクを出す === 
 +  - 修正を上流にマージしてほしい場合は、pull requests を出す 
 +  - ブラウザーで自分のリポジトリにアクセスする 
 +    * https://github.com/nobukoba/nestdaq \\ {{:softwares:nestdaq:git_forking_workflow_pull_request.png?600|}} 
 +  - 左上あたりの Pull requests ボタン {{:softwares:nestdaq:git_forking_workflow_pull_request_button.png?100|}} を押す。 
 +  - 以下のような画面に飛ぶ。ここで、緑の New pull request ボタンを出す。 \\  {{:softwares:nestdaq:git_forking_workflow_pull_request_2.png?600|}} 
 +  - ここで、緑の Create pull request ボタンを出す。 \\  {{:softwares:nestdaq:git_forking_workflow_pull_request_3.png?600|}} 
 +  - Add a description でコメントを編集し、緑の Create pull request ボタンを出す。 \\  {{:softwares:nestdaq:git_forking_workflow_pull_request_4.png?600|}} 
 +  - 以下のような画面に飛ぶ。プルリクが承認されると、また見え方が変わるはず。 \\  {{:softwares:nestdaq:git_forking_workflow_pull_request_5.png?600|}} 
 ==== Troubleshooting ==== ==== Troubleshooting ====
   * https://wiki.idempiere.org/ja/Fork_and_Branch_Git_%E3%83%AF%E3%83%BC%E3%82%AF%E3%83%95%E3%83%AD%E3%83%BC を見ると、すでにnobukoba/nestdaq.git をクローンしている場合、そのディレクトリに移動して、以下のコマンドを実行すれば、origin の登録ができると書いてある。<code>   * https://wiki.idempiere.org/ja/Fork_and_Branch_Git_%E3%83%AF%E3%83%BC%E3%82%AF%E3%83%95%E3%83%AD%E3%83%BC を見ると、すでにnobukoba/nestdaq.git をクローンしている場合、そのディレクトリに移動して、以下のコマンドを実行すれば、origin の登録ができると書いてある。<code>
softwares/nestdaq/git_forking_workflow.1706522903.txt.gz · 最終更新: 2024/01/29 19:08 by kobayash
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0