Tag: rebase

Can Git convert merges to squashes during rebase?

/———————–O R—A————M—D \——B—C—/ As far as I understand I can run git rebase either with –preserve-merges or without. In the tree shown above, rebasing A..D onto O with the option, I believe will result in: R—O—A————M—D \——B—C—/ Doing the same without the option will give: R—O—A—B—C—D Is there a way to achieve R—O—A—S—D with S […]

Git – creating a pretty log using rebase

We have started using Git on our continues delivery (CD) project. Our DevOps decided that we must have a clean Git log, where every bubble correlates to a technical/user story. In the log, a commit on the master must be a merge commit from a feature branch. The log must not have more than one […]

Unexpected result of git rebase master in local branch

I had a local branch which was branched off master quite some time ago, on which there were several commits. I wanted to get this local branch up to date with master so I did git co my_branch git rebase master expecting this to replay the commits in my_branch on top of master. However, it […]

Is it possible to block git pulls/fetches?

in our project we have a jenkins job running from a remote master branch. Developers often rebase from this remote master to fetch the latests changes into their local copies. What we want is to avoid this rebasing when the jenkins is broken (red or yellow ball). Instructions are “rebase only if jenkins is green” […]

Feature branches and Pull Requests – Git

Can I make users of an open source project, clone the project, branch off to a feature branch, make their changes, test by rebasing their code on top of the current working branch and then push, for a pull request, their feature branch so I can rebase their changes into my work? (not sure if […]

Mercurial: Back out public changesets and reapply to new public branch?

We’re using Kiln and Fogbugz; Kiln is supposed to seamlessly allow git and hg to work together. However, we’ve run into an issue where git branches are treated like bookmarks in mercurial; we didn’t catch this in our repo until changes had been pushed, and now the branches are a bit polluted. I have public […]

Is there an equivalent of “git apply –reject” for git rebase?

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 root. When git cannot apply a commit cleanly, it updates the file to show conflicts like this […]

Git: push for teamwork, then rebase for integration

I am working on a project managed with Git with about 20 people divided into teams. The project managers require that all of the working branches are not just merged into master, but are rather rebased onto master and then merged by the managers themselves. According to the information I found so far, you should […]

How to rebase a branch and its descendant?

What I have: master — A — B — b1 \ —– b2 — C — b3 A, B and C are commits; b1, b2 and b3 are branches (commits with branches pointing to them). What I want: master — A — B — b1 — b2 — C — b3

how to rebase these complicated merged commits with git

Currently I have this complicated merged commits tree : * 36cd4ff merge commit to rebase 12 (master,origin/master,HEAD) |\ | * f8d22cf merge commit to rebase 11 | |\ | | * 4381ba4 merge commit to rebase 10 | | |\ | | | * c81227f commit to rebase 9 | * | | d16e5ca commit […]

Git Baby is a git and github fan, let's start git clone.