Tag: git merge

Merge + Squash does not change MERGE_HEAD?

We are working in a team where we had local branches with everyone working their own branch and we had committed few branches and merged with –squash. Now we have to delete those branches that are merged in in ‘staging’ branch. The issue is when we command ‘git diff‘ to see our branches, it shows […]

Git hooks to fire when using merge with –no-ff

Assume I have two branches: feature master If I merge feature into master and force a commit merge with –no-ff like so: git merge feature –no-ff Will any of the client side commit hooks (e.g. commit-msg, pre-commit) be fired? I would assume so since with –no-ff, we are introducing a commit. Yet they don’t seem […]

What have I changed during a manual git merge?

I am in the middle of a big manual git merge, the code is not compiling, and I’m trying to figure out what I’ve done wrong. I think I can find out the difference between the working tree and my current branch with git diff -C HEAD and the difference between the working tree and […]

How to implement Stash Pull request 'Merge' button

In an Atlassian-Stash system, I have a repository with both pre-receive and post-receive hooks implemented but now the developers started to use the pull request (which is great!) but clicking ‘Merge’ button skips the logic that is in the pre- and post-receive hooks (which is blocking the merge is some cases and activating a build […]

ignore merges in a git diff

I want to do a git diff from a tag which is ignoring merges in his branch. Let explain what I want with a simple example # ~+A git diff running here #Branch B ______________________|_____________________________________| # | ^ | | # +Z | +Y | # tag1 |merge A Merge B # |in B |in […]

Appending history of one git repository to another

How can I tack the history of one git repository onto another? I have two similar projects I’d like to merge the histories of. They have diverged somewhat, but essentially the job they do is now the same, which is why I wanted to do this. So essentially I’d like it to take it from […]

Merge multiple commits git

I have following commit’s in my branch $ git log –pretty=oneline aa2ea957db6bf5f097b0e2f046c4c3f76758c6d9 Merge branch ‘CentralCache_Stats’ of gi ==> When I pull from master it create new commit don’t why ? 4ece4416421334e8be75893ef1416bb8509d2a44 [744] New API for central cache informa ==> I make changes and did commit –amend then also it create new commit. a49d7ef9f2e0c7adedb8dee96f79ce1d9e2855db Merge branch […]

Convert git repo with submodules to single repo

I have a git repository with several submodules which i would like to convert into one single repository containing all the history. Is this possible? The closest solution I’ve found is to merge the submodules into the parent repo as described in these questions: un-submodule a git submodule Git merge submodule into parent tree cleanly […]

Git Partial Fork, synced pull/merge

I want to fork a Git repository A that works with interface X, to my own repository B that works with interface Y. To to this I would remove X related files and create my own Y related files, however I want to be able to pull changes to the core from repository A, in […]

Git merge auto-add all new lines

//EDITED FOR CLARITY Is there any way to actually, or theoretically merge two commits and keeps all of the different content between them. Suppose you have a master branch with a single file called index.js //master //index.js alert(‘A’); alert(‘Z’); Two branches off of master look like this: //Branch 1 //index.js alert(‘A’); alert(‘B’); alert(‘Z’); //Branch 2 […]

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