Проблемы с git pull через ветки: fatal: Не удалось найти удаленный реф - PullRequest
0 голосов
/ 27 декабря 2011

Я знаю, что я сделал не так, но не знаю, что это испортило или как это можно исправить.

Итак, я работал над отраслевым продуктом, аналогичным основному. Тогда у меня есть другая ветка release-28122011. Я работал над выпуском 28122011. Тогда я сделал

git pull origin origin - возможно, обновлены некоторые ссылки в ветке релиза для обновления до продукта

тогда я осознал свою ошибку и попытался сделать git pull из релиза, но он выдает фатальные ошибки Есть ли способ исправить это.

kamal@kamal-Lenovo-G470:~/git/BigHelloWorld$ git stash
Saved working directory and index state WIP on release-28122011: 4ab88ba Merge branch 'release-28122011' of ssh://182.71.101.50/BigHelloWorld into release-28122011
HEAD is now at 4ab88ba Merge branch 'release-28122011' of ssh://182.71.101.50/BigHelloWorld into release-28122011
kamal@kamal-Lenovo-G470:~/git/BigHelloWorld$ gs
# On branch release-28122011
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   modified:   BigHelloWorldWeb/src/main/java/com/BigHelloWorld/web/filter/RequestIdentifierFilter.java
#   modified:   BigHelloWorldWeb/src/main/webapp/views/mobile/set1/about.jsp
#   modified:   BigHelloWorldWeb/src/main/webapp/views/mobile/set1/addressDetails.jsp
#   modified:   BigHelloWorldWeb/src/main/webapp/views/mobile/set1/failureNotice.jsp
#   modified:   BigHelloWorldWeb/src/main/webapp/views/mobile/set1/home.jsp
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#   BigHelloWorldWeb/src/main/webapp/views/mobile/docomo/
no changes added to commit (use "git add" and/or "git commit -a")
kamal@kamal-Lenovo-G470:~/git/BigHelloWorld$ git add .
kamal@kamal-Lenovo-G470:~/git/BigHelloWorld$ gs
# On branch release-28122011
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#   modified:   BigHelloWorldWeb/src/main/java/com/BigHelloWorld/web/filter/RequestIdentifierFilter.java
#   modified:   BigHelloWorldWeb/src/main/webapp/views/mobile/set1/about.jsp
#   modified:   BigHelloWorldWeb/src/main/webapp/views/mobile/set1/addressDetails.jsp
#   modified:   BigHelloWorldWeb/src/main/webapp/views/mobile/set1/failureNotice.jsp
#   modified:   BigHelloWorldWeb/src/main/webapp/views/mobile/set1/home.jsp

kamal@kamal-Lenovo-G470:~/git/BigHelloWorld$ git commit -m "WAP fixes 8" BigHelloWorldWeb/src/main/java/com/BigHelloWorld/web/filter/RequestIdentifierFilter.java BigHelloWorldWeb/src/main/webapp/views/mobile/set1/about.jsp BigHelloWorldWeb/src/main/webapp/views/mobile/set1/addressDetails.jsp BigHelloWorldWeb/src/main/webapp/views/mobile/set1/failureNotice.jsp BigHelloWorldWeb/src/main/webapp/views/mobile/set1/home.jsp
[release-28122011 a7067bb] WAP fixes 8
 Committer: kamal <kamal@kamal-Lenovo-G470.(none)>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:

    git config --global user.name "Your Name"
    git config --global user.email you@example.com

After doing this, you may fix the identity used for this commit with:

    git commit --amend --reset-author

 21 files changed, 738 insertions(+), 152 deletions(-)
 create mode 100644 BigHelloWorldWeb/src/main/webapp/views/mobile/docomo/purchaseConfirm.jsp
 create mode 100644 BigHelloWorldWeb/src/main/webapp/views/mobile/docomo/purchaseUserDetails.jsp
kamal@kamal-Lenovo-G470:~/git/BigHelloWorld$ git pull origin product
remote: Counting objects: 125, done.
remote: Compressing objects: 100% (62/62), done.
remote: Total 80 (delta 38), reused 0 (delta 0)
Unpacking objects: 100% (80/80), done.
From ssh://192.168.2.251/BigHelloWorld
 * branch            product    -> FETCH_HEAD
Auto-merging BigHelloWorldResources/build/build.sql
Merge made by recursive.
 .../impl/CustomerCareAdminServiceImpl.java         |   16 ++-
 .../catalog/impl/ProductBulkUploadAdminImpl.java   |   21 +++--
 .../com/BigHelloWorld/core/dto/OrderItemDetailDTO.java  |   49 ++++++---
 .../com/BigHelloWorld/core/dto/SuborderDetailDTO.java   |   12 ++
 .../com/BigHelloWorld/core/dto/filter/FilterDTO.java    |  113 ++++++++++++++++++++
 .../BigHelloWorld/core/dto/filter/FilterListDTO.java    |   25 +++++
 .../main/java/com/BigHelloWorld/core/entity/Filter.java |   75 +++++++++++++
 .../java/com/BigHelloWorld/core/entity/FilterValue.java |   70 ++++++++++++
 .../com/BigHelloWorld/core/entity/ProductCategory.java  |   22 +++-
 .../com/BigHelloWorld/core/entity/ProductOffer.java     |   12 ++
 BigHelloWorldResources/build/build.sql                  |    6 +-
 .../java/com/BigHelloWorld/dao/filter/IFilterDao.java   |   29 +++++
 .../BigHelloWorld/dao/filter/impl/FilterDaoImpl.java    |   73 +++++++++++++
 .../BigHelloWorld/services/filter/IFilterService.java   |   28 +++++
 .../services/filter/impl/FilterServiceImpl.java    |   56 ++++++++++
 .../BigHelloWorld/web/controller/FilterController.java  |   78 ++++++++++++++
 .../webapp/WEB-INF/spring/applicationContext.xml   |    2 +
 .../main/webapp/WEB-INF/spring/spring-servlet.xml  |    1 +
 .../src/main/webapp/views/customer/orderDetail.jsp |    9 ++-
 19 files changed, 663 insertions(+), 34 deletions(-)
 create mode 100755 BigHelloWorldCore/src/main/java/com/BigHelloWorld/core/dto/filter/FilterDTO.java
 create mode 100755 BigHelloWorldCore/src/main/java/com/BigHelloWorld/core/dto/filter/FilterListDTO.java
 create mode 100755 BigHelloWorldCore/src/main/java/com/BigHelloWorld/core/entity/Filter.java
 create mode 100755 BigHelloWorldCore/src/main/java/com/BigHelloWorld/core/entity/FilterValue.java
 mode change 100644 => 100755 BigHelloWorldCore/src/main/java/com/BigHelloWorld/core/entity/ProductCategory.java
 mode change 100644 => 100755 BigHelloWorldCore/src/main/java/com/BigHelloWorld/core/entity/ProductOffer.java
 mode change 100644 => 100755 BigHelloWorldResources/build/build.sql
 create mode 100755 BigHelloWorldServices/src/main/java/com/BigHelloWorld/dao/filter/IFilterDao.java
 create mode 100755 BigHelloWorldServices/src/main/java/com/BigHelloWorld/dao/filter/impl/FilterDaoImpl.java
 create mode 100755 BigHelloWorldServices/src/main/java/com/BigHelloWorld/services/filter/IFilterService.java
 create mode 100755 BigHelloWorldServices/src/main/java/com/BigHelloWorld/services/filter/impl/FilterServiceImpl.java
 create mode 100755 BigHelloWorldWeb/src/main/java/com/BigHelloWorld/web/controller/FilterController.java
kamal@kamal-Lenovo-G470:~/git/BigHelloWorld$ git pull origin product
From ssh://192.168.2.251/BigHelloWorld
 * branch            product    -> FETCH_HEAD
Already up-to-date.
kamal@kamal-Lenovo-G470:~/git/BigHelloWorld$ git status
# On branch release-28122011
# Your branch is ahead of 'origin/release-28122011' by 8 commits.
#
nothing to commit (working directory clean)
kamal@kamal-Lenovo-G470:~/git/BigHelloWorld$ git pull origin release-28122011
fatal: Couldn't find remote ref release-28122011
fatal: The remote end hung up unexpectedly
kamal@kamal-Lenovo-G470:~/git/BigHelloWorld$ git checkout release-28122011
Already on 'release-28122011'
Your branch is ahead of 'origin/release-28122011' by 8 commits.
kamal@kamal-Lenovo-G470:~/git/BigHelloWorld$ git status
# On branch release-28122011
# Your branch is ahead of 'origin/release-28122011' by 8 commits.
#
nothing to commit (working directory clean)
kamal@kamal-Lenovo-G470:~/git/BigHelloWorld$ git pull origin release-28122011
fatal: Couldn't find remote ref release-28122011
fatal: The remote end hung up unexpectedly

1 Ответ

0 голосов
/ 27 декабря 2011

Это может быть излечимо с git reset --hard commit-before-screwup.(Но жесткий сброс не без опасностей сам по себе. Возможно, лучше клонировать репо и попробовать в клоне.)

...