KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have made several commits in the master branch and then merged them to the dev branch. I want to create a branch from a specific commit in the dev branch, which was first committed in the master branch. I used the commands: git checkout dev git branch <branch name> <commit id> However, this creates the branch from the master branch, not the dev branch I expected. The commit id is same in the master branch and dev branch. So, how can I distinguish same commit id in a different branch? PS: I made an example at GitHub . I used the commands: git checkout dev git branch test 07aeec983bfc17c25f0b0a7c1d47da8e35df7af8 I expect that the test branch contains aa.txt , bb.txt , and cc.txt . However, the test branch only contains aa.txt and cc.txt . It most likely created the branch from the master branch.
Tags (comma-separated)
Save Edits
Cancel