4 ms·
Rebase is "rewind local changes" "pull" "replay local chances" Basically it makes it so that all of the local-only commits are sequenced after any remote chang
by aidenn0 9y ago
Rebase is "rewind local changes" "pull" "replay local chances"
Basically it makes it so that all of the local-only commits are sequenced after any remote changes that you have not seen yet.
[edit]
YZF is correct. In the context of pulling (i.e. "git pull --rebase") my description is correct. However in general rebasing branch X to Y that diverge from commit C is:
rewind branch Y to commit C; call the old tip of Y Y'
play all commits from C -> X on Y
play all commits from C -> Y' to branch Y.
- YZF 9y agoYou can rebase between two local branches. The rebase operation has nothing to do with pull or remote vs. local.
- aidenn0 9y agoYes. I thought we were in the context of git pull --rebase...
- e12e 9y ago"pull" might be the first thing I'd throw out, if thought there was any hope of fixing git ux. Then add a working merge --dry-run #do i have conflicts?.
- aidenn0 9y agoI think a default of --ff-only would be fine for pull. This is great for when I'm merely a consumer of a project, and will never silently perform a merge or rebase.
- specialist 9y agoThanks (all) for the clarifications. When explaining to others, I should probably say 'pull, reapply, then push'. Perhaps 'rebranch' is a better word choice than 'rebase', to conceptually more closely match what's actually happening under the hood.