Make git pull --rebase preserve merge commits
git pull --rebase removes unpushed merge commits. Is there a way to make it preserve them?
Say my history looks like—
A being the merge commit.)
git pull --rebase it becomes—
X being the new commits
git pull --rebase inserted into my history.)—
A is removed.
I know you can use
git rebase --preserve-merges to preserve them with
git rebase, but I don't see a way to preserve them with
git pull --rebase.
I was working only on my master branch (silly, I know!) and I pushed the commit to my repo and then opened a pull request against upstream. Someone wanted me to fix this commit so I've done it and mad
Background: I have a feature branch A that is one commit ahead of my development branch: 3 (develop, origin/develop) | 2 (A, origin/A) some feature branch commit |/ 1 some commit Then I rebase A on d
I make a branch (b1) from develop branch git checkout -b b1 and make some commmits over b1 at same time, make some commits over develop, when I try merge the commit of develop over b1 git merge devel
I am having a problem with git p4 rebase and I don't know how to start diagnosing the issue, much less what the problem is. So I have a git repo cloned from a perforce workspace by git-p4 and it's bei
I have the following situation: master A - B - E / second C - D - F What is the best solution to revert all commits of 'second branch' from master branch? The 'second' branch has about 70 commits.
Did anyone managed to make an interactive rebase with Git Extensions ? Option is available when rebasing, but whenever I selected the last n commits, select interactive in the rebase window, the edi
I want to use git rebase to take a sequence of commits and apply them to a different root commit. For example, git rebase --onto root start finish to get the commits from start to finish based on roo
When I encounter a merge conflict using git rebase, how can I identify the source of the conflict in terms of commits, rather than just file differences? I already know how to make (basic) use of git
I have done a series of commits and now I'm seeing that I would have liked to have 2 commits merged. Not the last two, but a bit further away My log: commit 326f35d83963660893d065e480f231b76f052dd2 Au
I have a local git repository created with git svn clone. I make a local branch, make some changes, switch back to master, git svn rebase and if it's all good, I merge my branch back into master. Then
I have set up some remote tracking branches in git, but I never seem to be able to merge them into the local branch once I have updated them with 'git fetch'. For example, suppose I have remote branch
The problem: I'm getting a merge conflict every time I try to pull into my subtree even when I have no changes. What I'm doing: In subtree-repo # Make some changes $ git commit -am 'Changes made' $ gi
I want to merge some commits from master to a tag. We create tags to mark major releases. However, if we need to do some quick fixes. We do it in master. But then we need to merge those commits to the
I understand that if I have a branch ready to merge with remote master, I need to do: git checkout 'my branch' git rebase master (rebase because I want simple history + my changes are minuscule enoug
I just did a git pull --rebase origin master and there was a conflict. Firstly, this conflict was in a file that I hadnt touched, and was about 10 commits back. Why does this happen? I then accidently
I do a git pull and I get merge conflicts. I resolve the merge conflicts manually and issues a pull again but Git refuses to do it as Git is still thinking that there are merge conflicts. Is there a
I'm new to git (and enjoying it a lot!). While developing in a new branch, I kept committing the various development 'states' of my application. Now I have to check it in for review but didn't want ev
I have some commits: - 1 - 2 - 3 - 4 - 5 (HEAD, master) Afterwards I notice Commits 2 & 3 really should have gone on their own branch. They are completely independent of commits 4 and 5 Can I us
I pulled the latest code from the repository with git pull --rebase. My local commit conflicts with one of the remote commits. The file in question has the merge markers in it, so I can compare my ver
Say I create a hotfix branch off develop, make 2 commits and then merge this back to develop and destroy the hotfix branch. How do I find out what commits were part of the merge. Is that possible?
I have created a pull request on Github. I have 2 commits in the pull request. How (if it is possible) can I merge only the first commit, and then create a second pull request for the second commmit.
I make new branch from master with git checkout -b testbranch I made 20 commits into it. Now i want to squash those 20 comits. I do that with git rebase -i HEAD~20 what about if i don't know how many
Here's a workflow that I use: Make changes in branch A. Checkout branch B. Merge changes from branch A to branch B. Sync (push and pull) branch B to a remote branch. Checkout branch A. Go back to ste
I want to squash the last 12 commits into one. I tried this command but get a fatal error: >git rebase -i HEAD~12 fatal: Needed a single revision invalid upstream HEAD~12 I have one remote reposit
I'm trying to figure out why rebase requires a three-way merge. For instance, if we have A1 - A2 \ B1 And I've checked out B1, and I want to perform: git rebase A2 why does git merge A2, B1 AND A1
Starting with hack---F1----M1----F2 (feature) / / C1-----C2----C3 (master) I would like to end up with hack---F1----M1----F2 (feature) / / C1-----C2----C3---F1'---F2' (master) So far the best I ha
I simply want to edit some commits with git rebase -i HEAD~2 inside the current branch. I use Ubuntu 10.10 and had to install gvim first to make the command work. Afterwards, the command opens a gvim
This question already has an answer here: Combine the first two commits of a Git repository? 7 answers With git rebase --interactive <commit> you can squash any number of commits together
is it possible to play a git diff in the changes brought by the automatic merge after a git pull? Usually, if there are any conflicts i can check on those using normal git diff, but no idea how to do
I have a branch 'firstproject' with 2 commits. I want to get rid of these commits and make them appear as a single commit. The command git merge --squash sounds promising, but when I run git merge --
I wrote a node module that uses git to make a bunch of commits from time to time. Considering the commits are better if grouped into one single commit, I'd like to use git rebase -i to squash them i
I have rather big amount of file in repository. Thus git sometimes crashes due to out of memory exception during rebasing changes. E.g. git checkout feature git rebase master (nasty out of memory exce
I am using git GUI. How can I implement the git bash command git pull --rebase? I am going to use this command before push.
Please help me to write a batch file for git rebase which unites two last commits: HEAD and HEAD~1 in current branch into one without using interactive editor. Assume that both commits have single par
So, yesterday I posted a question regarding some weird conflicts when I tried to rebase an upstream branch into my local topic branch. In the end I used git rebase --merge upstream and solved a lot of
I have a very strange problem: I have two separate branches and I am doing a simple git rebase --onto branchA tagOnMaster. This is done via a script that used to work perfectly on my old 32 bit machin
I wanted to reword a commit in git so I did a git rebase -i 00112233 or something similar and I get merge conflicts without making any changes to the commits that will be applied. I enter the merge co
I am looking for a way to merge my master branch into my test branch, while keeping my commits in test on top (after master is merged in). What's the appropriate way of doing it?
Are there any tools available that will let me rebase in git style an SVN branch onto a new parent? So, in the following situation, I create a feature branch, and there are commits to the trunk E---F
In git, I have one parent branch p and several branches based on p called a, b, c. I want to rebase a, b, and c on an updated p in a single git command. Is this possible? If so, how?
Background: We use github for our project and I work on my own fork of our main repository. We use rebase instead of merge to avoid large merge commits. Scenario: The way I want to work is like this:
I have a question regarding continuous integration with Jenkins for Git/Gerrit: is there any way to cancel Jenkins job execution when the Git change needs a rebase/merge due to previous change has bee
Our version control manager recommends us to use git pull --rebase to pull new changes from upstream branch. I want to use EGit (Eclipse plugin for git) to execute that. How can I do this?
I recently started using magit package in emacs and its really useful and handy. I would like to make couple of tweaks. How do I make magit pull to be always have rebase option?. Currently it shows u
I understand the scenario presented in Pro Git about the risks of git rebase. The author basically tells you how to avoid duplicated commits: Do not rebase commits that you have pushed to a public re
I'm coming from a SVN background. I've forked and branched a git repository. Then I changed the branch (let's call it my-branch), committed, pushed and sent a Pull Request. It happens that the upstrea
So if I'm using branches that are remote (tracked) branches, and I want to get the lastest, I'm still unclear if I should be doing git pull or git rebase. I thought I had read that doing git rebase wh
I always use git commit --verbose. Is there an equivalent option/setting that will make git show me the diff when I'm rewording a commit message during git rebase --interactive?
Looking through the git-config variables and git-pull documentation I don't see a way to make git-pull pull verbose by default. Anybody know of a way?
git-rebase man page mentions -X<option> can be passed to git-merge. When/how exactly? I'd like to rebase by applying patches with recursive strategy and theirs option (apply whatever sticks, rat