[prev in list] [next in list] [prev in thread] [next in thread]
List: git
Subject: using --force-with-lease after git rebase
From: Alexander Mills <alexander.d.mills () gmail ! com>
Date: 2018-10-31 19:13:06
Message-ID: CA+KyZp5Zv77idtpu9jtxDUyE9zPP8UN3LsQBG=M5yM2cnMFgVQ () mail ! gmail ! com
[Download RAW message or body]
I have been confused about the need for --force-with-lease after rebasing
Imagine I have a feature branch:
git checkout --no-track -b 'feature' 'origin/dev'
git push -u origin feature
I do some work, and then I rebase against origin/dev to keep up to
date with the integration branch.
git fetch origin/dev
git rebase origin/dev
then I try to push to the remote
git push origin feature
but that is rejected, I have to do:
git push --force-with-lease origin feature
why is that? Why do I need to force push my feature branch to the
remote tracking branch after rebasing against the integration branch?
-alex
related question:
https://stackoverflow.com/questions/52823692/git-push-force-with-lease-vs-force/53042745#53042745
--
Alexander D. Mills
¡ ¡ ¡ New cell phone number: (415)730-1805 !!!
alexander.d.mills@gmail.com
www.linkedin.com/pub/alexander-mills/b/7a5/418/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic