GitHubからインポートを行い、Eclipseで開くまでの手順
$ git clone git@github.com:amaraimusi/eccube4_demo.git
$ git branch -vv main abfa21e [origin/main] 海へ行きたい * okinawa_fish c60f3e3 山へ行きたい tanuki c3dce2a ファーストコミット
$ git pull There is no tracking information for the current branch. Please specify which branch you want to merge with. See git-pull(1) for details. git pull <remote> <branch> If you wish to set tracking information for this branch you can do so with: git branch --set-upstream-to=origin/<branch> okinawa_fish「git branch --set-upstream-to=origin/<branch> okinawa_fish」コマンドを書き換えて実行すれば良いようだ。
$ git branch --set-upstream-to=origin/gurukun okinawa_fish Branch 'okinawa_fish' set up to track remote branch 'gurukun' from 'origin'.以上でローカルブランチとリモートブランチの紐づけ完了。
$ git branch -vv main abfa21e [origin/main] 海へ行きたい * okinawa_fish c60f3e3 [origin/gurukun: ahead 1, behind 1] 山へ行きたい tanuki c3dce2a ファーストコミット
$ git pull Auto-merging README.md CONFLICT (content): Merge conflict in README.md Automatic merge failed; fix conflicts and then commit the result.
$ git push origin gurukun error: src refspec gurukun does not match any error: failed to push some refs to 'git@github.com:amaraimusi/eccube4_demo.git'
$ git push fatal: The upstream branch of your current branch does not match the name of your current branch. To push to the upstream branch on the remote, use git push origin HEAD:gurukun To push to the branch of the same name on the remote, use git push origin HEAD To choose either option permanently, see push.default in 'git help config'.「git push origin HEAD:gurukun」を実行するようにとのこと。
$ git push origin HEAD:gurukun Total 0 (delta 0), reused 0 (delta 0) To github.com:amaraimusi/eccube4_demo.git abfa21e..204ccce HEAD -> gurukun