Gitのメモ

central <-> clone

で運用しているとき。

central側でbranchを削除してしまった場合

clone側にcentralのbranch情報が残ってしまう。

[central]


central$ git branch
 * master
test
test2
central$ git branch -d test2
central$ git branch
 * master
test

[clone]


clone$ git branch -a
 * master
test
remotes/origin/master
remotes/origin/test
remotes/origin/test2

clone側に情報が残ってしまったので下記のコマンドで削除して確認する。


clone$ git branch -d -r origin/test2
clone$ git branch -a
 * master
test
remotes/origin/master
remotes/origin/test

remote/origin/test2が表示されない事を確認して終了。