Ich versuche mein Git zu resetten, weil ich alle möglichen Probleme habe. Es würde mir nicht erlauben, mehrere große Dateien auf meine Fernbedienung zu schieben, und ich weiß nicht, wie ich sie aus dem Commit löschen kann. Ich kann mich nicht einmal daran erinnern, die Dateien zu übergeben.Zurücksetzen von GIT lokal auf Remote-Version
meine Fernbedienung ist: pmp_staging
[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>
Ich konnte nicht herausfinden, wie diese Dateien aus dem Original entfernen begehen. Ich habe versucht, den Kopf zurück zum Ursprung zu bewegen, aber ich kann ihn nicht loswerden. Stattdessen würde ich gerne neu anfangen. Ich möchte nur, dass meine Git-Fernbedienung mit meinem lokalen übereinstimmt, damit ich mit dem Üben von Pushs und Commits beginnen kann. Alles, was ich auf Stack-Overflow suche, scheint nicht zu funktionieren.
[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>...]'
Dank!
Klonen Sie es noch einmal? –
Sie können "git reflog" versuchen, um die vorherige HEAD Position zu sehen und dann reset --hard auf diese Position verwenden –