I would like to get a specific commit
and turn it into a blank.
Is there any way to do this in Git
?
I would like to get a specific commit
and turn it into a blank.
Is there any way to do this in Git
?
Just commit the ID at the time of creating the branch:
git checkout -b BRANCH_NAME COMMIT_ID
Example
git checkout -b teste 5d6b8da2f0e32a100087eecb73fc2dd47579748f
With this, a new "test" branch will be created based on the commit below: 5d6b8da2f0e32a100087eecb73fc2dd47579748f
To view commits history, type:
git log
After that, just get the commit ID you want:
git commit -b nomebranch 7e85bcb18b1fcf58738f3ec6a2e04171975ef442
Or:
git checkout 7e85bcb18b1fcf58738f3ec6a2e04171975ef442
git checkout -b nomebranch