git pull origin master is still ahead of origin/master by 1 commit -
i made commit on local copy of master
, added commit separate branch / pull request. i'm on local master, start here:
git:(master) git status on branch master branch ahead of 'origin/master' 1 commit. (use "git push" publish local commits) nothing commit, working directory clean
i want out of commit, since merge branch, i:
git: (master) git pull origin master https://github.com/basho-labs/the-riak-community * branch master -> fetch_head up-to-date.
and i'm still in same state. out of this, i:
git:(master) git checkout head~1 note: checking out 'head~1'. in 'detached head' state. can around, make experimental changes , commit them, , can discard commits make in state without impacting branches performing checkout. if want create new branch retain commits create, may (now or later) using -b checkout command again. example: git checkout -b new_branch_name head @ abd0327...
but what's cleanest way handle history? don't want yet commit
, i'm not sure how proceed. i've reviewed past conversations similar names , don't see useful answer.
i accidentally pushed more commits , had think through little more. ended up:
git:(master)git reset --hard abd0327ec1b head @ abd0327 shortened introduction git:(master) git:(master) git status on branch master branch behind 'origin/master' 1 commit, , can fast-forwarded. (use "git pull" update local branch) nothing commit, working directory clean git:(master) git:(master) git push -f total 0 (delta 0), reused 0 (delta 0) https://github.com/basho-labs/the-riak-community.git + 5e39499...abd0327 master -> master (forced update)
and i'm happy history:
Comments
Post a Comment