Tag: merge

How to specify path when doing git show on a merge commit

I’ve got a merge commit, and I can show the entirety of it using git show -m. However, if I want to only show the change for a subfolder or a path, how do I do it? I tried doing git show -m — app/ but it didn’t show anything, even though git show –stat […]

What happened to my git repo after rebase and pull / push?

I’ve got master and fun branches in my local and remote git repos. To keep things clean after committing some new fixes to master, I decided to try the rebase command: git checkout fun git rebase master git push Git gave the error: Updates were rejected because the tip of your current branch is behind […]

Merging branch which contains revert commit to master overriding changes in master

We created a branch (release) from master (mainline). After some commits by mistake we take the pull of mainline into release and push it. On realising this we revert the merged push. Now when we are merging release back to mainline then our changes in mainline are getting overridden. Is there a way to fix […]

Git Merge only single file from master into current branch

This question already has an answer here: How do you merge selective files with git-merge? 20 answers

Cherry-picking merge commits

Let’s say I’ve got this scenario: sprint branch – – – –30——60—– – – – —150—- / some fixes – – —57—–59 / some more fixes – ——58 Now we realize we don’t need the fixes merged in commit 60. How can we revert them without removing everything else that was commited afterwards?

Maintain some changes on git merge

I’m a bit confused about a git mechanics. My work has 3 branches master devel and public. I use master for deploy my Node.js app into OpenShift (or heroku); devel is where i develope my feature and i use public for push my open source code on GitHub. Everytime i have to deploy my app […]

Merge changes of copied repository without true common ancestor in git

I have a project, DemoA that was built off of a git repository, Project1. Unfortunately, DemoA started as simply a copy of the files from Project1, before itself turning into an actual long-term project. I would now like to make Project1 a submodule of DemoA, but – more importantly – want to merge in the […]

Is it possible to merge from one branch to another in git with only certain files?

Let’s say I have two branches A B I want to merge the changes in A to B. However, A has some files that I changed as well as some files that someone else changed. For example, in A, there are 2 files that changed. path/to/JavaFile1.java (I changed this file) path/to/another/JavaFile2.java (another user changed this […]

How to exclude files from merging?

Just started to get my head around git and at the moment looking at merging. Suppose I have a master branch and I create a branch called child of this. I work on the childbranch and change some files. Now I want to merge this childbranch into the master branch: git merge child There are […]

how to check that all changes were taken after a git merge

in our git workflow we use branches (pretty much as described here a successful git branching model) so when we merge one branch into the other we use: git checkout <destination> git merge –no-ff <src> if there is a conflict, after resolving it, i would like to check if the merge was correct (if nothing […]

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