Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私が理解している限り、これら 2 つのコマンドはリモート追跡ブランチを削除できます。それらの間に違いはありますか?
git remote prune <branch_name>
git branch -d -r <branch_name>
はい。しかし、あなたはそれをあなた自身に証明することができます:あなたのgitリポジトリをコピーして、各コピーで各コマンドを実行してください。次に、それらのリポジトリ内の2つの.gitフォルダーで差分を実行します。
pruneコマンドには、ブランチ名ではなく、リモート名が必要です。これにより、指定されたリモート上にないすべてのリモート追跡ブランチが削除されます。ブランチ-d-rパラメータは。である必要があります<remote>/<branch_name>。
<remote>/<branch_name>