git checkout master/branching question
Posted
by danwoods
on Stack Overflow
See other posts from Stack Overflow
or by danwoods
Published on 2010-03-11T00:24:01Z
Indexed on
2010/03/11
20:44 UTC
Read the original article
Hit count: 525
Hello all, I 'm relatively new to git and and having some problems early on. I've made several commits, but when I try to push them I get a response that says everything is up-to-date. I feel like my problem is the same on listed in this question, but it recommends the following:
$ git log -1
# note the SHA-1 of latest commit
$ git checkout master
# reset your branch head to your previously detached commit
$ git reset --hard <commit-id>
What exactly will "checking out the master" do? I just don't want to lose the changes I've made...
screenshot of gitk:
© Stack Overflow or respective owner