2016-04-29 5 views
1

を押したりソースツリーなし:Gitはコメント1として

私は既にコンピュータにGitリポジトリを持つbitbuckets命令

を追ってきましたか?それをBitbucketにプッシュしよう。

cd /path/to/my/repo 
git remote add origin [email protected]:... 
git push -u origin --all # pushes up the repo and its refs for the first time 
git push origin --tags # pushes up any tags 

アトラシアンソースツリーを通じて

git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags --set-upstream origin master:master 
Pushing to C:\... 
remote: error: refusing to update checked out branch: refs/heads/master[K 
remote: error: By default, updating the current branch in a non-bare  repository[K 
remote: error: is denied, because it will make the index and work tree inconsistent[K 

remote: error: with what you pushed, and will require 'git reset --hard' to match[K 
remote: error: the work tree to HEAD.[K 
remote: error: [K 
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to[K 
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into[K 
remote: error: its current branch; however, this is not recommended unless you[K 
remote: error: arranged to update its work tree to match what you pushed in some[K 
remote: error: other way.[K 
remote: error: [K 
remote: error: To squelch this message and still keep the default behaviour, set[K 
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.[K 
To C:\... 
! [remote rejected] master -> master (branch is currently checked out) 

error: failed to push some refs to 'C:\...' 

をプッシュしようとしたとき、私はこのエラーメッセージを取得していますそれから私は、私はSSHを追加しましたgitの端子

No refs in common and none specified; doing nothing. 
Perhaps you should specify a branch such as 'master'. 
fatal: The remote end hung up unexpectedly 
Everything up-to-date 

でこれを取得しますSourceTree(puTTy)および端末から生成されたキー。すべてのステップに従って、まだ私は失われています。私は2時間古いHAのようにこれで新品です。誰でも正しい場所で私を歩けますか?

+0

エラーメッセージに至るまでの作業の詳細を含めることはできますか? –

+0

更新されました。これは基本的に私がやっていたものです – EasyBB

+1

だから、コマンドラインからプッシュしてプッシュできますか、そこに問題がありますか? –

答えて

0

あなたはローカルのハードドライブのどこかにあるリポジトリ(奇妙ですがそれにもかかわらず奇妙に聞こえるかもしれません)にプッシュしようとしています。その行を見てくださいPushing to C:\...

また、ターゲットリポジトリはbare repositoryではなく、ブランチmasterがチェックアウトされています。デフォルトでは、gitはリモートの非裸のリポジトリのアクティブなブランチにプッシュすることを拒否します

おそらく、あなたは「本当のリモートリポジトリ」にプッシュするつもりでした。上流のリポジトリの設定方法を確認することをお勧めします。これを確認するには、SourceTree

git -c diff.mnemonicprefix=false -c core.quotepath=false config remote.origin.url 
0

enter image description here

を起動しようとすると、Open SSHPuTTY/PlinkからSSH Clientを変更してみてください。

関連する問題