1
votes

This question has probably been asked 100s of times on the internet.

I made changes to a Gemfile and _config.yml. I git add -A, git commit -m, git push. Go online to check github and the files I updated have not changed.

Read through online forums for hours. I have updated post-receive, checked the .gitignore file. Not sure what I'm doing wrong. The most frustrating part is that git seems to be pretty straightforward and I'm probably missing something very simple.

After trying many different things, git status returns the following:

HEAD detached at origin/master
nothing to commit, working tree clean

Previously, I was mostly getting the "everything up-to-date message", no matter what I did.

1

1 Answers

2
votes

HEAD detached means you did not push your (detached) HEAD branch to the master branch.

You need to restore said HEAD and merge it to master before pushing once again.

git branch my-temporary-work
git checkout master
git merge my-temporary-work
git push

Note: that pushes to the remote master branch.
But id the remote repo is set to show a different branch, that means you would not see your commits right away: you would need to switch back to the master branch first (through the GitHub web UI).