【Groovy/Grails Tool Suite and Git】git pullでエラー
別環境でpushしたソースを始めてpullした際にエラーが発生したのでメモ
git勉強しないとダメだなあ
1. pull。エラー発生
The current branch is not configured for pull No value for key branch.master.merge found in configuration
2. configファイル編集
eclipse 4.2×EGit環境でPush/Pullのハマりどころを回避する | mooappを参考させて頂いた
Window → Open Perspective → Git Repository Exploringを選択
プロジェクトを右クリック → Properties → Openボタンを選択。configファイルが表示される
[core] repositoryformatversion = 0 filemode = false logallrefupdates = true # 以下を追加 [branch "master"] remote = origin merge = refs/heads/master rebase = true
3. 再度pull。またもやエラー
The current branch is not configured for pull No value for key remote.origin.url found in configuration
4. 再度configファイル編集
電脳世界にダイブイン!: GitHub with Eclipseを参考させて頂いた
[core] repositoryformatversion = 0 filemode = false logallrefupdates = true [branch "master"] remote = origin merge = refs/heads/master rebase = true # 以下を追加 [remote "origin"] url = https://github.com/tezu35/grails-ec-admin.git
これでConfigure Fetch from Upstreamメニューが活性状態となる
プロジェクトを右クリック → Team → Remote → Configure Fetch from Upstream → Addボタンを選択
sourceにmを入力、候補が表示されるのでmaster → Finishボタンを選択
Save and Fetchを選択
5. 再再度pull
成功。コンフリクトしてるけど、、