I am on master
branch with 7 commits (say) and moved to commit No. 4 using 'git checkout <commit_hash>
' with HEAD being in detached state now.
I made 3 new commits from commit No. 4 with detached HEAD and created a new branch 'dev
' there.
Then I checked out to dev
and again made a new commit.
Now can I say that all the commits from this dev
branch tip commit till root commit of the project belong to dev
branch or only the dev
tip commit and previous commit belong to dev
branch?
What is the concept of belongingness of commits to a branch ?