tokisabaのブログ

エンジニア系シェアハウスEngineMakerの管理人ブログ

error: failed to push some refs to 'https://...'

ハマったので記録だけ。

-------------
poge$ git push --set-upstream origin hoge/hage_hige
Counting objects: 270, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (138/138), done.
Writing objects: 100% (270/270), 127.36 KiB | 5.09 MiB/s, done.
Total 270 (delta 163), reused 197 (delta 108)
remote: Resolving deltas: 100% (163/163), completed with 55 local objects.
To https://github.com/Hogu/Hoga.git

! [remote rejected] hoge/hage_hige -> hoge/hage_hige (cannot lock ref 'refs/heads/hoge/hage_hige': 'refs/heads/hoge' exists; cannot create 'refs/heads/hoge/hage_hige')
error: failed to push some refs to 'https://github.com/Hogu/Hoga.git'
-------------

 

階層構造っぽいブランチ作ったときの、hogeの部分がかぶってたのが原因らしく、hoge2/hage_hige 的なものでブランチきってそっちにpushしたらいけた。
gitイマイチわかんない。