Tag: rebase

Keeping an alt branch up to date with common

I’ve got a repository that has two branches: common and alt. The common branch holds the version of the code that is the most common use case for most people. The alt branch holds a version of the project where some things are configured differently but most things are the same as on common. Up […]

Is it safe to squash commits from other branch

There are two branches master and feature. The development goes in feature branch and there multiple commits done in that branch, but in between them there were several merges with master branch, so the log for feature branch is for example something like: feature commit 1 master commit 1 feature commit 2 master commit 2 […]

Intermittent git error: “Cannot rebase: You have unstaged changes.”

I see a lot of intermittent git errors when changing to or rebasing branches. Sometimes it will tell me I can’t change branches because it would conflict with unstaged changes, even though my branch is clean (git status shows “nothing to commit, working directory clean”). If I try the same command again, it works the […]

How to squash all git commits into one?

How do you squash your entire repository down to the first commit? I can rebase to the first commit, but that would leave me with 2 commits. Is there a way to reference the commit before the first one?

Git: Preventing Commit During a Rebase

I know how to easily ‘fix’ this state, when I’ve accidentally done a git commit –amend during an interactive rebase. But I’m wondering if anyone has a solution, of any level of complexity, that would allow me to configure git/terminal/bash to PREVENT me from being able to do this. I’m just using Mac OSX Terminal. […]

Intellij with Git – Contents have differences only in line separators

I’ve just installed intellij with git and pulled down code from the framework. Immediately after doing this, I get hundreds (out of thousands) of files saying that ‘contents have differences only in line separators’. If I change these from CRLF to LF it makes no difference. Any idea how to fix this?

git rebase messy devel branch

I have a devel branch on Github with 1500 commits and they need to be rebased into perhaps 50 commits to closer resample features. The commits are messy in that, one feature wasn’t developed fully before new commits came from another feature. Rebasing and fixing indentation will have to be done collaboratively. Some of the […]

squash commits after rebasing

I’ve worked on my branch and made 20 commits. Then I rebased against master. Now my branch has the latest commits from master, which go up to today, then the 20 commits of my own. The git log shows my 20 commits together, however the time of commits shows my commits mixed in with other […]

git rebase and file conflict

After doing my work in my branch, I made pull request to merge my branch in to master. Github show one file of my branch has conflict and can not be automatically merged. On the other hand, my manager asked me to rebase my branch. I did rebase as following: $ git checkout master $ […]

How to force rebase when same changes applied to both branches manually?

My repository looks like: X – Y- A – B – C – D – E branch:master \ \ \ \ merge master -> release \ \ M — BCDE — N branch:release Here “M – BCDE – N” are manually (unfortunately!) applied changes approximately same as separate commits “A – B – C – […]

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