Merge HEAD to master

Viewed 612

I have problems with merging HEAD to master, when executing git merge master - I get "already updated" Help please, thanks

* 0b3b69b - (35 минут назад) chart on exchange page - Little Whale (HEAD)
* 8f52f4b - (6 часов назад) exchange modul works correctly - Little Whale
* a6c836e - (2 дня назад) commit for checkout on other commit - Little Whale (master)
* 9e59520 - (2 дня назад) pie chart renders correctly - Little Whale
* f57ace2 - (2 дня назад) input group in portfolio page are fixed and works correctly - Little Whale
* 3a45fc1 - (3 дня назад) exchange block implemented - Little Whale
* 75f7ca9 - (4 дня назад) portfolio was done - Little Whale
* 5ea03ec - (5 дней назад) currency block and pie chart implemented - Little Whale
* 8913e2c - (5 дней назад) Initialize project using Create React App - Little Whale
2 Answers

To expand on eftshift0's comment, the full command to use would be:

git log --decorate --online --graph --all --branches

You would then be able to see where HEAD is positioned, relative to master.

As LeGEC comments, a more focused command would be:

git log --decorate --online --graph HEAD master

From the output of your log command : it looks that your current master branch (commit a6c836e) is indeed already part of HEAD's history -- HEAD (commit 0b3b69b) is two commits ahead of master. So there is nothing more to merge from master into your current commit.

If your intention is to have master move forward to 0b3b69b, you should merge the other way around :

git checkout master
git merge --ff-only 0b3b69b

In your situation, the --ff-only is not necessary (you already know it will be a fast forward merge) ;
in a more general usage : in situations where you want to avoid to create a useless merge commit if you can, this option makes sure that it won't happen without you realizing it.

Related