Git Error When Pushing to GitHub -
i'm new git, sourcetree, , version control in general please forgive ignorance.
i had project on github couple dozen commits master branch, never made other branches there commits master , nothing else.
using sourcetree, pulled down project , checked out older version of project intending work on version , discard of newer commits.
at point, project branches work on older version of project little bit , go commit work. commit goes smoothly when go push project github server shows error message
says head detached hash. mean , how fix it? dialog box pushed from.
thank time looking @ this.
edit: i'm wanting push master branch, while duplicate question wanting else detached head.
you've made commit detached head
means don't have branch refers head
, not allowed push github. commit should in master
.
so should do:
0) open bash , go project directory.
1) stash uncommitted changes keep safe.
git stash
2) rebase commits onto master
.
git rebase master
3) resolve conflicts if have it.
4) push changes.
git push
5) stashed uncommitted changes.
git stash pop
all information git can find in pro git
Comments
Post a Comment