Tag: merge

Automatically merge two XML files by selecting both conflicting lines

I have two conflicting files. Here is the first file (a.xml): <doc> <ignore name=”ignore1″ /> <ignore name=”ignore2″ /> <interesting name=”foo.a” /> <ignore name=”ignoreN” /> <interesting name=”bar.a” /> </doc> And here is the second one (b.xml): <doc> <ignore name=”ignore1″ /> <ignore name=”ignore2″ /> <interesting name=”foo.b” /> <ignore name=”ignoreN” /> <interesting name=”bar.b” /> </doc> So basically it […]

git merge Issues Branch with different folder structure

Am facing some issues in merging git branches. My problem is as below I have a master branch with folder structure src> views> a.js…. I have created another branch A from the master and modified the folder structure to WWW > Views> a.js….. but I didn’t push the commits to master Also I have another […]

Can I change how git-describe counts commits?

My question is related to git describe: inexplicable commit count and commit count calculation in git-describe, but not quite identical to either question. I’ve been developing on a feature branch in my current project, and I’ve been using git describe to get version numbers for the feature branch, using the recent tag and commit count […]

How do I “merge” two YAML text files?

use meld / xxdiff / or something else? say if I have two yaml files, how can I merge them automatically? each of them has a few hundred lines. the common part is abc: abc: x: 0: null y: 1: null def: x: 0: string … and abc: u: null v: null w: null def: […]

Finding an approximate Git fork-point

Often when vendors publish their kernels, they either release a tarball or squash all the commits down into one (branch public in this post); I have no access to internal. I’m attempting to create a branch (recovery) to clearly identify what changes have been made from the mainline kernel (original). original: A–B–C–D–E–F internal: A–B–C–D \ […]

How to merge 2 LOCAL git repositories on 2 machines into one?

I have been developing 2 parts of a project separately, and I’d like to merge them. I did not push any of them to a remote server, but I want to. 2 local repos to merge : software on Linux PC (SW) microcontroller firmware on Windows PC (FW) How do I end up with a […]

Force to atomically rebase and non-fast-forward merge using Gerrit/GitLab

We are deciding to use Gerrit or GitLab for code review. And here is our commit history guide: every task should be developed on another branch, not on the main branch. before we submit, we have some works to make sure code quality (e.g. code review) use rebase and merge –no-ff for every branch to […]

Git revert followed by merge getting 'revert already in progress' error

Commits D & E were checked into branch XXX by mistake instead of YYY. We are trying not to use git reset to solve this. So we have: XXX: A -> B -> C -> D -> E YYY: A -> B -> C We reverted to commit C on branch XXX git checkout XXX […]

git merge and rebase two repositories

I need to merge two git repositories by rebasing the root of the second repository onto the head of the first one. While doing so, it should keep: the commit history all author dates + names all tags unmerged (feature) branches merged branches the two repositories have common files (same file name) and the content […]

Git ignore and don't track merged remote files

My terminology may be a bit messed up. I have 2 repos. Let’s call the one Parent and the other Child. Child is dependent on Parent to work. I allow Child to track Parent’s updates through git remote add parent parent@git. In Child I setup .gitattributes merge=ours for certain files that may be common like […]

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