LoginSignup
25
25

More than 5 years have passed since last update.

gitのHEAD(ローカルスタート)

Posted at

手順はちゃんと覚えてないのですが
gitを次の手順ですすめると、ローカルにHEADがない、カンジになってしまう様子。

1.サーバ(github/bitbucket)を作成
2.ローカルでファイル準備
3.git init
4.git remote add
5.git fetch/push

ブランチ構成
>git branch -a
 master
 origin/master

だけで、origin/HEADがないという状態になる。
サーバ側にはmaster->HEADの設定はされててもダメ。

なので以下で設定を行う。

HEAD設定
>git remote set-head origin master

気付くのに時間がかかったので、忘備録として。
初期はなんか色々ブランチ作ってマージしたりしてたので。

25
25
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
25
25