using --force-with-lease after git rebase

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx

www.linkedin.com/pub/alexander-mills/b/7a5/418/




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux