2

I have configured Gitlab on a local server. When I push code to the origin , It shows only half of commit history and skips rest of commits .

Here is my commit history on my computer: enter image description here

So my last commit is done today but my Gitlab setup shows latest commit of may 2015. Screen shot of the same:

enter image description here What can be probable reasons for it and how I can fix it?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Abhijeet Panwar
  • 1,837
  • 3
  • 26
  • 48
  • Did you push in a branch different from master? In your first screenshot, what would a `git log --pretty=oneline --decorate` give you? – VonC May 05 '16 at 05:24
  • @VonC : Adding screenshot with this commands.Yeah , it seems I have done something wrong – Abhijeet Panwar May 05 '16 at 05:39

1 Answers1

2

HEAD without a branch means you are in a detached HEAD.

A git push would only push a branch (a commit associated with a branch name), not your detached HEAD.

You can fix that by creating a temporary branch and merging it to master: it will fast-forward master to it.

# git add/commit first
git branch tmp
git checkout master
git merge tmp
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250