GitHub のリポジトリにバグ報告 (Issue) のトピックを作成・投稿した後、そのトピックの文章を再び編集する手順を紹介します。
タイトルと本文で編集を始めるための操作が異なる点や、編集内容のプレビューでの確認、編集内容を保存した後の結果などについて紹介します。
Issue (バグ報告) のトピックの作成と投稿
Issue のトピックの作成と投稿については以下の記事を参照してください。
投稿したトピックを編集する
投稿した Issue のトピックに、編集の例として補足の文章を追記します。
GitHub にログインした状態で、投稿したトピックのページ「Bug: Files vanish when deleting current branch in Git plugin · Issue #278 · godotengine/godot-git-plugin」にアクセスします。

本文を編集するには、本文の枠の右上にある「…」ボタンを押して表示されるメニュー「Edit」を選択します。
※ページの右上の Edit ボタンを押すとタイトルが編集できるようです。

Edit メニューを選択すると、本文の枠内が編集画面に変わります。
Write タブで、マークダウン形式でトピックの本文を編集できます。
※前回アップロードして掲載した画像も [Image](url) のマークダウン形式のテキストとして扱うことができます。

今回の編集では、あらかじめ作成しておいたマークダウン形式の文章を追加します。

追加した文章は、日本語で作成した文章を Windows 10 の Copilot に翻訳してもらいました。
念のため Google 翻訳で再度日本語に訳して確認しています。
## 問題は、ファイル削除ではなく、選択中のブランチを削除できてしまうこと
(2025/04/23 追加)
ブランチが切り替えられた際に、切り替え前(例では publish ) には管理されていて、切り替え後(例では master ) には管理されていないファイル・フォルダが削除されるのは TortoiseGit でも同様の動作であることを確認しました。
しかし、この削除されたファイル・フォルダは、切り替え前のブランチ(例では publish) に戻すことで復元できます。
```
master branch
a.txt
publish branch
a.txt
b.txt
ブランチの切り替えによるファイルの状態
publish -> master -> publish
a.txt -> a.txt -> a.txt
b.txt -> (deleted) -> b.txt
```
この Issue で伝えたい点は、Remove branch によって選択中のブランチ(例では publish)が削除された際に、自動的に残りのブランチ(例では master)に切り替わり、ファイル・フォルダが削除されたこと自体ではありません。
その後、切り替え前のブランチ(例では publish )がすでに削除されてしまっていて、ファイル・フォルダが復元されない点です。
```
選択しているブランチの削除で、自動的に master ブランチに切り替わった際のファイルの状態
publish -> master -> publish (deleted)
a.txt -> a.txt -> 切り替えられません。
b.txt -> (deleted) -> 切り替えられません。
```
そのため、Remove branch で表示されるリストでは、選択中のブランチ(例では publish)は選択できないようにしたほうが安全だと思います。
## The Issue is Not File Deletion, but the Ability to Delete the Currently Selected Branch
*(Added on 2025/04/23)*
When switching branches, it was confirmed that TortoiseGit also deletes files or folders that were tracked in the previous branch (e.g., `publish`) but not in the branch after switching (e.g., `master`).
However, these deleted files or folders can be restored by switching back to the original branch (e.g., `publish`).
```
master branch
a.txt
publish branch
a.txt
b.txt
File states during branch switching
publish -> master -> publish
a.txt -> a.txt -> a.txt
b.txt -> (deleted) -> b.txt
```
The main point of this issue is not that files or folders were deleted when the selected branch (e.g., `publish`) was removed and the remaining branch (e.g., `master`) was automatically switched to.
Instead, the point is that after the original branch (e.g., `publish`) was deleted, the files or folders cannot be restored.
```
File states when the selected branch is deleted, and it is automatically switched to the `master` branch
publish -> master -> publish (deleted)
a.txt -> a.txt -> Cannot switch back.
b.txt -> (deleted) -> Cannot switch back.
```
Therefore, it would be safer if the list displayed in the "Remove branch" option prevents selecting the currently active branch (e.g., `publish`).
マークダウン形式で編集が済んだら、 Preview タブを選択して、編集内容が正しく表示されるか確認しましょう。

追加した文章の、見出し・段落・コードが、正しく表示されていることが確認できました。

プレビューで編集結果を確認したら、編集画面の枠内の右下の Save ボタンを押して保存します。

Save ボタンを押すと、すぐに公開されているトピックのページに戻り、先ほどの編集内容が反映されていることを確認できました。

以下は、編集したトピックへのリンクです。
まとめ
今回は、GitHub のリポジトリにバグ報告 (Issue) のトピックを作成・投稿した後、そのトピックの文章を再び編集する手順を紹介します。
タイトルと本文で編集を始めるための操作が異なる点や、編集内容のプレビューでの確認、編集内容を保存した後の結果などについて紹介します。
参照サイト Thank You!
- GitHub Japan | GitHub
- Bug: Files vanish when deleting current branch in Git plugin · Issue #278 · godotengine/godot-git-plugin (今回投稿した Issue のページです)
記事一覧 → Compota-Soft-Press
コメント