Tag: git merge

git merge says Already up-to-date but there's a committed difference in the branches

I have two branches: master and develop. When the changes from develop are finalized they are merged into master. At this point, the branches should be synchronized. However, I noticed that one file is missing from master but is on the develop branch. (It looks like it was deleted somehow but I cannot find any […]

missing files after git merge

Some weeks ago I create a feature branch, I’m developing in. There are severals commits and some new files as well. I can change from master branch to my development branch and versa vice and everything is fine. Today I tried to merge my branch back to the master branch. Therefore I changed to master […]

Git (windows); P4merge as mergetool error

I’ve tried setting up p4merge as my mergetool, but I can’t seem to get it working. Here’s my commands: git config –global merge.tool p4merge git config –global mergetool.p4merge.path “C:/Program Files/Perforce/p4merge.exe” git config –global mergetool.p4merge.cmd “p4merge.exe \”$BASE\” \”$LOCAL\” \”$REMOTE\” \”$MERGED\”” And here’s the error I’m getting: I’ve also tried installing a portable version of git and […]

Why does git sometimes mark added lines as changed lines (i.e. an empty conflict over an added piece of code)

I still don’t have a confirmed way to reproduce this but in case this is some well known issue, I’ll ask it anyway. What happens is that git often creates conflicts like this: <<<<<<< HEAD } // action_do_add ======= } // action_do_add …lots of code here… >>>>>>> some_branch So instead of noticing that I simply […]

Git: pre-receive hook to allow only merges and not direct commits into master

I have a problem creating a pre-receive hook on a git remote branch, doing what I want. What’s the problem? Direct commits to the master branch should be not allowed. Only merges into the master branch should be allowed. Solution My solution until now is to check, if there are changes in the push from […]

How many types of branches exist in git?

Struggling to understand how to work with remote branches and how many types of git branches there are I somehow got lost in differing namings and git versions. Here’s a few things that happened to me, while believing there are only TWO types of git branches: I unwillingly created a non-tracking local branch (so push […]

Git Merge without removing the other branch to pull the changes

I searched a lot but was not able to find a confident solution(pardon me as I am new to git and maybe I didn’t get some term well). So I will state my exact problem here: I have a software (say in branch main) of which I just released v5.0 and then I created a […]

Merging branch back with clean history

I am working on a branch (with others) off of master. A – B – C – F – G (master) \ D – E (branch-a) Periodically, we merge master into the branch, to minimize conflicts later. A – B – C – F – G (master) \ \ D – E – H (branch-a) […]

What does it mean that a Git push can not be fast foward merged?

Can someone please provide a simple example of what would cause a Git push to a central repo to fail because a fast forward could not occur? What would the local repo vs the central repo’s state need to look like in order for this to occur? Really having trouble visualizing this…

Why do I always have to merge manually on git pull?

I am a new user of git and can’t figure out how to get around this. I have had some experience with SVN and am going by SVN behavior. Any time I pull files from remote repository, and the file I have modified are also modified remotely, it needs merging. I can understand merge conflicts […]

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