Questions tagged [rebase]

Changing the starting point of a branch in a Version Control System.

An operation in a version control system or a special way of creating a shared library. (In order of the question counts in Stack Overflow)


Version Control Systems

In some source control system (also known as Version Control Systems o ) that support a rebase is one of the ways of integrating the changes of one branch into another by changing the "father" or starting point of a branch.

Git

See .

Darcs

Support it's still in an early status (March 2013)

Mercurial

There is a Rebase Extension for mercurial as noted in "How to do a rebase like git's rebase"

Subversion

There is no rebase support but using merge --reintegrate might be considered as a similar operation as mentioned in "Subversion rebase?" and "Subversion Branch Reintegration v1.5"


Shared Libraries

Creating a shared library to avoid conflicts with other libraries in the usage of virtual memory. (Wikipedia)

2189 questions
0
votes
1 answer

Branch diverging after rebase

In my feature branch, I rebased off main in CLion which resulted in a couple of file conflicts and after solving them, I do: git log # commit # commit # commit git status # Your branch is up to date with…
xyf
  • 664
  • 1
  • 6
  • 16
0
votes
2 answers

How to replace one git branch with another?

Sometimes I will checkout a test branch to see if a rebase / whatever works. But this leaves me in a situation where I have some branch feat-234, and some branch test, and I want to replace feat-234 with test. Example workflow: # on branch…
baxx
  • 3,956
  • 6
  • 37
  • 75
0
votes
0 answers

How can I rebase out irrelevant Git commits and keep the latest versions of my files?

I have a branch off of main called AI_feature.' When I first created the branch, it ended up copying the commits from main along with it. Now that I am trying to merge the branch back into main, I was asked to only commit files that were relevant to…
0
votes
1 answer

Quickly select all "other" modifications during merge

Let's say one is running git pull --rebase from remote branch, that results in lots of conflicts in the files being merged to. Is there a quick way without tedious file editing (some git command?) that would just take all alternatives from the…
Student4K
  • 916
  • 2
  • 9
  • 20
0
votes
1 answer

Interactive rebase changes order without being prompted

I observed an unexpected behavior in an interactive rebase today. It was always my understanding that if I run an interactive rebase and don't change anything in the editor, it should not have any effect, but apparently that's not so (at least on a…
Dani Gehtdichnixan
  • 1,265
  • 1
  • 11
  • 21
0
votes
0 answers

Is it possible to specify the strategy option, for pulls (--rebase) on a (local) repository?

I use a program that is stored as github reposity on the user (my) machine; it updates itself periodically, by just pulling (with rebase) the remote repository. I made a change that creates conflicts frequently. Since I don't have control on how the…
Marcus
  • 5,104
  • 2
  • 28
  • 24
0
votes
1 answer

How to push to remote repo after rebase without all previous added commit history?

I'm not good at git yet. I want to ask you, how the rebase with remote repo should be made. I mean, I have main branch (remote) and I also have branch eg. my_branch (local). When PR for merging my_branch to main was open, there was few more commits…
Yunnane
  • 85
  • 9
0
votes
0 answers

Can BitBucket change Merge Strategy whilst branches are being worked on

Our BitBucket repository was originally setup to use "Merge Commit" merge strategy. Six months back someone has changed the repository to use "Rebase and fast-forward" which we were unaware of. In the last month, work has started up again on the…
gas828
  • 139
  • 2
  • 11
0
votes
1 answer

GIT rebase says that file was deleted in HEAD but it has only been updated

When completing a rebase on a branch git rebase branch master the file I have been editing on the branch no longer has my changes and the log states: CONFLICT (modify/delete): client/src/pages/Section/index.js deleted in HEAD and modified in…
Cemal Okten
  • 819
  • 1
  • 6
  • 13
0
votes
2 answers

Is reorder commits safe if we get no conflict?

Say I'm working on a project with two tickets. And has some dirty commits. commit4 do ticket2.2 commit3 do ticket1.2 commit2 do ticket2.1 commit1 do ticket1.1 Is it safe, if I reorder it to such like this with no conflict: commit4 do…
0
votes
1 answer

Can I imitate fast-forwarded pull if my local branch diverges with remote in Git?

I have three branches first, second, and master: D---E---F first / A---B---...---C---... master \ G---H second first is a final version and is waiting to be merged into master as a single squashed commit. second…
soad
  • 49
  • 6
0
votes
0 answers

What commits are included in git rebase list?

I wanted to edit a commit message that was already merged into the master branch (which is a protected branch). To do that, I created a new branch from a master branch and used interactive git rebase(i.e. git rebase -i HEAD~2), rewrite the commit…
safa
  • 21
  • 4
0
votes
1 answer

Deleted file during rebase, how can I get it back?

I was going through a rebase, and accidentally deleted one of my files. When I try to get it back via git checkout it tells me error: path 'foo' is unmerged When I try to get it back via git reset foo, I get the following error: fatal: ambiguous…
0
votes
1 answer

Search a 200 lines long git hash id list for a short id

I need to search a long list of git hash ids for a short id which added a file. For the purpose I checked what was the hash of an old commit which added a file script.js, which I successfully do like: git log --diff-filter=A -- script.js , but it…
apingaway
  • 33
  • 1
  • 1
  • 17
0
votes
1 answer

git add option like -a for git commit

During a long rebase (say, for an integration branch with lots of commits to the main development branch), I frequently have to git add all of the files with conflicts that I've resolved. Recently I tried git add -all thinking it would be like git…
Jeff Learman
  • 2,914
  • 1
  • 22
  • 31
1 2 3
99
100