I am new to git, and have created a local branch by following git checkout -b child
syntax, then I went on and merged someone else's branch using git merge origin/parent
.
Note: I did not push my local branch i.e. child
up yet.
git status
shownnothing to commit, working tree clean
- which is confusing, my limited knowledge may be the cause Update - I learned that git merge commits the code too, I should have probably usedgit merge --no-commit
I want to undo my merge to start afresh - How do I do it?
Disclaimer There are tons of git related questions out there, which maybe tangentially related to the above questions, but please realize that for a new guy it is quite overwhelming, internet is boon and bane.
EDIT - 1 I am also reading whether I should have performed git merge
first place, or should have used something like git fetch
EDIT - 2 git reset HEAD~x
is NOT what I am looking for, I just want to un-do the whole git merge