git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Work is not replayed on top while: git pull -v --rebase

From
KKES <kes-kes@yandex.ru>
Date
Sep 20, 2018, 11:05 UTC
Message-ID
<6160201537441514@iva5-cb9df376e345.qloud-c.yandex.net>
Hi.
TL;DR; Some local commits are lost while `git pull -v --rebase`
[alias]
    tree        = log --graph --decorate --pretty=oneline --abbrev-commit
    changes     = log --graph --decorate --pretty=oneline --abbrev-commit --cherry-pick --boundary --left-right
<HERE I do some work, commit it and push>
<after some time>
$ git fetch origin 
remote: Counting objects: 806, done.
remote: Compressing objects: 100% (197/197), done.
remote: Total 806 (delta 587), reused 806 (delta 587)
Receiving objects: 100% (806/806), 85.96 KiB | 0 bytes/s, done.
Resolving deltas: 100% (587/587), completed with 19 local objects.
From https://tracker.feel-safe.net/gitdev/main
 + a562406d...f9015227 296_tos    -> origin/296_tos  (forced update)
Here we see that someone did 'forced update'
$ git tree -n 5
* a562406d (HEAD -> 296_tos, back) Bulk changes         ### <<< PUT ATTENTION HERE
* 177e2515 Bulk changes
* 934bbb31 Fix Profile Page
* 811d8812 Fix button's width on Authorization form
* 97ca9419 Fix Tariff Options page
Here git know that a562406d already pushed to remote
Now I want to update my branch
$ git pull -v --rebase
From https://tracker.feel-safe.net/gitdev/main
 = [up to date]        296_tos                    -> origin/296_tos
....
 = [up to date]        text-page-style            -> origin/text-page-style
Changes from f66c29158a57d687aaf48fb89f9b897563c0142e to f9015227da20ad1f858174b4b4c188338eb26640:
 cpanfile                                |   4 +
....
 templates/v2/tos/tos.html.ep            |   4 +-
 31 files changed, 1694 insertions(+), 106 deletions(-)
 create mode 100644 lib/DbMapper.pm
....
 create mode 100644 t/DbMapper/update_data.t
First, rewinding head to replay your work on top of it...
$ git tree -n 5
* f9015227 (HEAD -> 296_tos, origin/296_tos) Bulk changes
* 95064421 Fix Profile Page
* c03c930a Fix button's width on Authorization form
* e6df0662 Fix Tariff Options page
* 22b5c754 Fix header on order page

$ diff <(git show f901522) <(git show 177e2515) 1c1 < commit f9015227da20ad1f858174b4b4c188338eb26640 ---

> commit 177e2515eb2bc1c9733b4374f2da373aa969a601
$ git changes a562406d...f9015227
>   50e9343a Merge branch 'orm' into dash_v2
|\  
| > 4be5e3c6 Test data fetching from DataSet
| > 11d60181 More tests: Manual condition OP for join expression
....
| < a562406d (back) Bulk changes
o f66c2915 (origin/dash_v2, dash_v2) Merge branch 'move_example_elements' into dash_v2
We can see that a562406d after rebasing **is lost**
Why a562406d is not applied on top of remote branch?

PS. for `git push --force` there is alternative: --force-with-lease Is there something similar to --force-with-lease but for `git pull -v --rebase`?

Next: Junio C Hamano
Message 1 of 4 in “Work is not replayed on top while: git pull -v --rebase”
  1. KESSep 20, 2018
  2. Junio C HamanoSep 20, 2018
  3. KESSep 25, 2018
  4. KESSep 25, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.