Tag: merge

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 […]

How do I get another git branch up to current branch?

I’ve redacted the image below for privacy reason, but basically I have two branches that I am trying to get on the same commit. The commit with the tag 4.3.1.11 is on a different branch than then one with the tag 4.3.1.13. I’ve tried merging 4.3.1.11 into 4.3.1.13 but nothing changes. I’m simply trying to […]

conflicts after merging branches. Files are the Same, but intellij git Says They are Different

I have merged foo branch into baar branch as discriped here. After merging, intellij git shows 300 files which contain conflicts. When I compare these files, I notice that some of them are the same. I can not recognize between two files, they are really the same. How to deal with this issue? I really […]

git creates merge commit instead of using fast forward. Why?

I am working on a WebApp project that uses a bare git repository that is organizes in three branches: dev-master beta-master public-master All development is done using a clone of the dev-master branch: Not the complete repository was cloned but only the specific branch: git clone /path/to/bare/repo.git –branch dev-master dev Once a new feature is […]

Output of custom merge driver for Git

I want to use the custom merge driver for Git. To do this I wrote the program, which takes 5 arguments %O %A %B %L %Pas described here in the block “Defining a custom merge driver” and makes 3-way merge. %O – ancestor’s version %A – current brunch version %B – other branches’ version %L […]

git pre-merge (via pre-commit) hook to identify if files in a specific directory have changed

I’m looking to create a pre-commit hook which does the following: IF the commit is a merge and it is being merged into master (this should only happen with a PR) IF the user has added or modified any of the files in folder A COMPARE the files in A in the branch being merged […]

How to use Git pull requests when testing on feature branch

We have just upgraded to the latest version of BitBucket, which allows us to disable direct pushes to the master branch. Now we are using a version of the Github Flow process (i.e. cloning feature branches from the master branch), and can only use pull requests to merge from feature/bugfix branches to the master. We […]

git – forcing merge of branches without any manual conflict resolution

Their are many answers to this question but they don’t work always. We have two branches master and master.min. checked out branch `master.min` git merge master –strategy-option theirs If some file is deleted in master the merge conflicts So I added code which finds the deleted files and deletes and commits them which fixed the […]

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