texasflood
texasflood

Reputation: 1633

Git: Add commits from same branch to master

I have the situation shown in the picture:

gitk screenshot

How do I move the master head to point to the top commit (Added preferences) because currently I cannot push to the remote repository as it says everything up to date (expected, since master is not pointing to the most recent commit)

Upvotes: 0

Views: 51

Answers (2)

Luke
Luke

Reputation: 609

What about:

$ git checkout master
$ git merge --ff-only <hash of topmost commit>

Upvotes: 2

Eimantas
Eimantas

Reputation: 49354

While on the "Added preferences" commit, try git merge master. Depending on whether you want fast-worward or not - you may add --ff flag.

Upvotes: 2

Related Questions