gitに追加したリモートサーバ上にフォルダがあります。サーバにプッシュするときのGitエラー
git init
git add .
git commit -m "Initial commit"
次に、ローカルのMacBookにリポジトリをプルダウンします。次に、index.jsファイルを追加し、gitに追加してコミットします。問題は、私がサーバーに変更されたrepoをプッシュしようとするときに来る。私は狂ったエラーを取得しています:
Refusing to update checked out branch: refs/heads/master By default, updating the current branch in a non-bare repository is denied, because it will make the index and work tree inconsistent with what you pushed, and will require 'git reset --hard' to match the work tree to HEAD.
アイデアはありますか?
プッシュにはどのようなコマンドを使用していますか? – sbrichards
私はGUIツールSoureTreeを使用しています。コマンドは次のとおりです:git push -v --tags origin master:master – Justin
git push -u origin masterを実行している端末から試してください – sbrichards