Tag: rebase

Git: rebasing a conflicted merge commit

After finishing working on a topic branch, I merged the topic branch into master like following: o—*—o—o topic / \ o—o—o—*—o—o—+ master The commits marked with ‘*’ modified the same code, hence merging lead to merge conflicts that were resolved in the merge commit (marked with ‘+’). While I merged and resolved the conflicts, my […]

Squash first N commits of git history / keep the rest as is

Consider the following problem: Private Project containing some credentials in the early stages We want to go open source We need to get rid of the credentials in the history credentials are not in single files but in code Complicated history with several merges, pull requests etc. What I want to do: Squash all commits […]

Git move single commit from feature_branch to master

What is the simplest way to achieve this? from: –A–B \ 1–2–3 to: –A–B–2 \ 1–3 I can’t figure any simple way to achieve this (less than like 5 steps).

Git pull with rebase causing excessive conflicts. How can I fix our workflow?

We have a base system that is customized for each client. The base lives in its own repository, and each client lives in its own repository (originally cloned from base). The goal is to have the ability to add bug fixes/features to base, which can be propagated to clients, on demand. So far the workflow […]

Can I squash _other peoples_ git commits in a submitted PR?

I have received a PR and wish to squash the commits so it’s nice. I’m not sure if I can do it or the respective authors have to do it? Of course, I wish to keep the author’s name referencing their squash commit. NOTE: this question is not about me squashing my own commits. Here’s […]

git safe rebase or “try rebase, fallback to merge”

I’m thinking of transforming my merge only workflow to using rebase more often. In this particular case, I’m the only developer, but I work on multiple platforms, often editing same files for platform-specific parts, usually with non-conflicting changes. But I’m a bit unsure about this, because of the debate about git merge vs git rebase, […]

Is there a fast way to rebase a long history of commits to master branch?

I’ve been working for the past two weeks on a feature, and I created a separate branch for it. The problem is that the task took me a long time, and I didn’t rebase my branch to master periodically. I ended up with 100+ commits and now when I’m trying to rebase the branch to […]

git svn and working with private branches?

new git user here. I want to use git, but i’m in an SVN environment. From some books I’ve read and some simple experimenting, I’ve hit some troubling pitfalls and am hoping to get clarification on how to get starting without my colleagues wanting to kill me. I want my workflow to be: a master […]

Integrator workflow, Is fetch-rebase-push safe for remote repos?

I’m managing a git repo using the integrator work flow. In other words, I pull commits from my co-workers, and push them out to the blessed repo. I’d like to keep the commit history linear for most cases, so is it OK to do a rebase instead of a merge when I integrate changes? Here […]

Git: Why does rebase result in conflicts while merge does not?

I’m probably not getting something right, but could anyone explain to me why git rebase results in conflicts, while git merge (same branch) does not? For as far as I know git rebase puts the commits from the other branch before the commits I made on my current branch, while git merge takes those same […]

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