Tag: rebase

Use git rebase because is easier to revert changes?

I wonder how git rebase helps reverting changes. I cannot understand why rebase is easier than merging for reverting changes. Update 1: Reverting a change I mean, reverting a previous version of master. Master v1 Master v2 Master v3 Master v4 Master v5 At this point I want to revert to Master v4 for example. […]

How to resync git with svn tree?

Background I’m adding some features to a project that uses subversion – I’m using git–svn to clone it to my local repository, git-svn rebase to keep with the recent changes in the official trunk and keep the history linear. Recently I’ve forgot myself and made a few merges which messed my rebasing – long story […]

How to check for conflicts during interactive git rebase?

I often use git rebase -i <ancestor> to reorder commits during development to clean up my frequently small commits by grouping related commits together. However my reordering has a tendency to lead to merge conflicts when a later hunk is reordered before an earlier hunk that overlaps. Is there a way to assess whether conflicts […]

Git: Undoing rewrite of history?

I have a problem with the following situation: several commits are pushed to a remote (our codereview system) developer has rewritten history (edited some commit during a rebase) locally when attempting to push again, codereview does not accept it (as this change can already haved passed review) How can I ‘reset’ a -single- commit to […]

Git repo: internal and open source external branches

What is the best way to set up a git repo for a project that your company uses internally, but you also want to open-source (but with a potentially modified history)? Let’s say Acme company has a repo “supercoolproject”. They want to open source it, but they don’t actually want the company name associated with […]

Git: how to amend an old merge (in a series of merges)?

I have a situation that sort of looks like this: (branch 1) A — B — C \ (dev br) E — F — G — H / / (branch 2) I — J — K — L This all worked fine. Unfortunately I figured out that I need to make a change to F […]

GIT change Base/Root Folder

I have a long (~2 years) repo with a lots of commits/branches, now for some reasons I need to change the root folder of the repository to one folder above. Some examples to clarify the concept. I have my repository inside a folder: c:\workspace\test\src\ so in my repo has all the changes in files/subfolder of […]

Recommended workflow for public and private forks of a public GIT-SVN-created repo

I’m trying to set up three things: a public GIT mirror of a public SVN repo a pubilc fork of that repo where multiple contributors can stage patches a private fork of the public repo from #2 I know how to do #1 but am looking for advice on #2 and #3: how to configure, […]

Git merges all the time

A programmer in my team has a very strange issue with a particular Git repository. He is the only user making changes to the repo, yet, everytime he pushes, Git will make a merge commit message rather than the actual commit message! It’s hard to explain so a picture is better suited: At some point […]

git: how to rebase a branch after it was merged and keep the merge commit's changes

I have a history like this: A – B – M \ / C A, B and M are master, C is on a feature branch. I made two mistakes: I didn’t realize that the company remote doesn’t accept merge commits before I made it. I changed a lot of things in the Merge commit […]

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