Попробуйте это
window.onload = function() {
if (window.File && window.FileList && window.FileReader) {
var filesInput = document.getElementById("uploadImage");
filesInput.addEventListener("change", function(event) {
var files = event.target.files;
var output = document.getElementById("result");
for (var i = 0; i < files.length; i++) {
var file = files[i];
if (!file.type.match('image'))
continue;
var picReader = new FileReader();
picReader.addEventListener("load", function(event) {
var picFile = event.target;
var div = document.createElement("div");
div.innerHTML = "<img class='thumbnail' src='" + picFile.result + "'" +
"title='" + picFile.name + "'/>";
output.insertBefore(div, null);
});
picReader.readAsDataURL(file);
}
});
}
}
<input type="file" id="uploadImage" name="termek_file" class="file_input" multiple/>
<div id="result" class="uploadPreview">
. Вам нужно создать новую фиксацию с теми же деталями, что и текущая фиксация HEAD
, но с родительским элементом в качестве предыдущей версии ГОЛОВА
. git reset --soft
переместит указатель ветки так, чтобы следующая фиксация произошла поверх другой фиксации, а не там, где сейчас находится текущая глава ветки.
# Move the current head so that it's pointing at the old commit
# Leave the index intact for redoing the commit.
# HEAD@{1} gives you "the commit that HEAD pointed at before
# it was moved to where it currently points at". Note that this is
# different from HEAD~1, which gives you "the commit that is the
# parent node of the commit that HEAD is currently pointing to."
git reset --soft HEAD@{1}
# commit the current tree using the commit details of the previous
# HEAD commit. (Note that HEAD@{1} is pointing somewhere different from the
# previous command. It's now pointing at the erroneously amended commit.)
git commit -C HEAD@{1}
используйте ref-log :
git branch fixing-things HEAD@{1}
git reset fixing-things
тогда у вас должны быть все ранее исправленные изменения только в вашей рабочей копии, и вы можете снова зафиксировать
см. полный список предыдущих индексов type git reflog
Вы всегда можете разделить фиксацию, Из руководства