Tag: git merge

Git rebase develop before merging to develop?

is it supposed to be a good practise to always rebase the develop branch back into my feature/ branch before merging my feature/ branch back into develop?

Why are evil merges considered harmful?

The question Evil merges in git? has a couple of answers describing what an evil merge is, but at most one of them (Jakub Narębski) was addressing what problems can be caused by them, and why they should be avoided. Ideally in terms that are easy for a beginner to understand by describing specific practical […]

How to add some specific commits from master to another branch on git

I’ve this work flow with git. origin/master is 7 commits ahead of my branch “crazy-work” and crazy-work has 10 new commits. Now I want to merge crazy-work to origin/master. What is the best way to do this with minimal conflicts. even if there any conflict occurs choose the crazy-work branch’s files as selected work. note […]

Restore git files deleted after git merge –abort

I’ve lost files added to git during “merge conflict” phase. Step by step: git pull git status Git informs me about “merge conflict”, that’s okay. Then I create a new file and add it to git. vi test.txt git add test.txt After that, abort merge: git merge –abort I have not found the file “test.txt” […]

git merge between different repositories

I created a repository with git-svn from a big svn repository (git svn clone). I’ve several local commits in my git repository that I don’t need to push to svn but I will need to get updates from it. Now I realized that I don’t need the entire svn history in my local repository, since […]

How to merge git repositories in subfolders without losing branches and tags?

While this question would seem to be a duplicate or many previous ones (and tens of blog posts dealing with similar subject), I need to make you aware that I am looking for an approach that would allow me to script it. all branches and tags are supposed to merged branches and tags are supposed […]

git merge: how keep master version of file?

I’m using git and am merging a branch into master after a pull request. My understanding is that if a file in the master wasn’t changed since the last common ancestor, but the same file in the branch was, git will use the version in the branch during the merge. For most of the differences […]

Fixing a merge commit in git

I messed up. I merged other branch to my branch. Changes on both sides were substantial so I spent extremely long time resolving conflicts. After committing the merge, I realized I had forgotten to add one file, so the merge was committed incomplete. I didn’t want to pollute the history with a “forgotten changes” commit […]

What's the best practice for a git branch that needs master to be constantly merged to it?

I’m working on a project that has basically 2 branches: master and “next-version”. The two are constantly changed and the next-version needs to have the latest changes from master, but I can’t just merge them both, because one version is published and the other one is still on alpha. I currently merge master to next-version […]

How to properly branch for 1.1.8 and for 2.0 at the same time and merging

I am starting from master and want to create a new branch for 2.0 of my app. At the same time I need to work on some bug fixes which will be 1.1.8, so I need to create a hotfix branch. My question here is, when I merge the 1.1.8 branch into master, it will […]

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