2017-03-12 15 views
0

私はすべての種類の問題を抱えているので、私のGitをリセットしようとしています。それは私が私のリモコンにいくつかの大きなファイルをプッシュすることはできませんし、コミットからそれらを削除する方法を知らない。私はファイルをコミットすることさえ気にしません。GITをリモートバージョンにリセットする

私のリモコンは次のとおりです。

[email protected] MINGW64 /c/wamp64/www/postmyproject (master)<br> 
$ git push pmp_staging master<br> 
Enter passphrase for key '/c/Users/kjlin/.ssh/id_rsa':<br> 
Counting objects: 7215, done.<br> 
Delta compression using up to 4 threads.<br> 
Compressing objects: 100% (7006/7006), done.<br> 
Writing objects: 100% (7215/7215), 44.69 MiB | 1.01 MiB/s, done.<br> 
Total 7215 (delta 1112), reused 0 (delta 0)<br> 
remote: Resolving deltas: 100% (1112/1112), done.<br> 
remote: git.wpengine.com: validating<br> 
remote: - info: detected push to staging application ...<br> 
remote: - info: validating files in 9f1931e ...<br> 
remote: - info: found application servers ...<br> 
remote: failed...<br> 
remote: system/large file types detected:<br> 
remote: ------------------------------------------------------------------<br> 
<br> 
remote: wp-content/mu-plugins/wpengine-common/preamble.php<br> 
remote: wp-content/mu-plugins/wpengine-common/redis-object-cache.php<br> 
remote: wp-content/mu-plugins/wpengine-common/s3-uploads.php<br> 
remote: wp-content/mu-plugins/wpengine-common/util.php<br> 
remote: wp-content/mu-plugins/wpengine-common/views/admin-footer.php<br> 
remote: wp-content/mu-plugins/wpengine-common/views/admin/advanced.php<br> 
remote: wp-content/mu-plugins/wpengine-common/views/admin/debug-db.php<br> 
remote: wp-content/mu-plugins/wpengine-common/views/admin/notice-sticky.php<br> 
remote: wp-content/mu-plugins/wpengine-common/views/admin/notice.php<br> 
remote: wp-content/mu-plugins/wpengine-common/views/general/powered-by.php<br> 
remote: wp-content/mu-plugins/wpengine-common/views/modal.php<br> 
remote: wp-content/mu-plugins/wpengine-common/views/staging-modal.php<br> 
remote: wp-content/mu-plugins/wpengine-common/views/wpe-migration-preview-<br>template.php 
remote: wp-content/mu-plugins/wpengine-common/wpe_wpdb.php<br> 
remote: ------------------------------------------------------------------ 
remote: please remove these files from your source, re-commit, and push... 
To git.wpengine.com:staging/postmyproject2.git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to'[email protected]:staging/postmyproject2.git'<br> 

pmp_staging私がコミット元からこれらのファイルを削除する方法を見つけ出すことができませんでした。私は起源に頭を戻してみましたが、それらを取り除くように見えることはできません。代わりに、新鮮なものから始めたいと思います。私はちょうど私の地元のリモートに私の地元の人と一致するように私はプッシュとコミットを練習を開始することができますしたい。私がスタックオーバーフローで探すすべてがうまくいかないようです。

[email protected] MINGW64 /c/wamp64/www/postmyproject (master)<br> 
$ git fetch pmp_staging<br> 
Enter passphrase for key '/c/Users/kjlin/.ssh/id_rsa':<br> 
<br> 
[email protected] MINGW64 /c/wamp64/www/postmyproject (master) 
$ git reset --hard master/master<br> 
fatal: ambiguous argument 'master/master': unknown revision or path not in the working tree.<br> 
Use '--' to separate paths from revisions, like this: 
'git <command> [<revision>...] -- [<file>...]'<br> 
<br> 
[email protected] MINGW64 /c/wamp64/www/postmyproject (master)<br> 
$ git reset --hard pmp_staging/master<br> 
fatal: ambiguous argument 'pmp_staging/master': unknown revision or path not in the working tree.<br> 
Use '--' to separate paths from revisions, like this: 
'git <command> [<revision>...] -- [<file>...]' 



ありがとう!

+0

もう一度クローンしますか? –

+0

"git reflog"を実行して前のHEADの位置を確認し、その位置にreset --hardを使用することができます –

答えて

0

rm -rf .gitを使用して私のgitリポジトリ全体を削除しました。

私は私が最初にセットアップに Git Hub'sヘルプを使用してWPengine.comためのSSHを持っていた再起動しなければならなかったとWPengine's GIT Page

の指示に従いました。これで私のSSHキーを取得してWPengine.comにインストールすることができました。

その後、私は指示に注意深く従わなければなりませんでした。私はZIP形式のインストールをダウンロードして、私のローカルWAMPフォルダに貼り付けました。 GIT Bashにログインし、私の/ c/wamp64/www/my_install /フォルダの下にSSHを設定します。

私たちは実際にオブジェクト指向プログラミングのためにいくつかのファイルを編集したので、Wordpress Coreの変更が可能な.gitignoreファイルをダウンロードしてセットアップする必要がありました。

私は、単にWPengineのプロトコルに従っ:

$ cd ~/wordpress/my_wp_install_name 
$ git init . 
$ git add . --all 
$ git commit -m "initial commit..." 

私はintially「を追加するのを忘れていなければなりません。 - すべて'。

セットアップは私のステージングにリモートにインストールマイ:

$ cd /c/wamp64/www/my_install 
$ git remote add staging [email protected]:staging/my_install.git 

私はその後、私のリモートに展開:私は次の時間をそれを台無しにするまで

$ git push staging master 

は、これまでのところ、GITが働いています。

0

git reset --hard pmp_staging/masterは、pmp_stagingにマスターブランチがない限り、うまくいくはずです。

git branch -aを実行して、pmp_staging/masterが存在することを再度確認します。

関連する問題