There is a branch
ABCDE
What happens if I go to the checkout B
command, to an earlier commit, make changes to the files and make a commit
git add -A git commit -m "Message"
There is a branch
ABCDE
What happens if I go to the checkout B
command, to an earlier commit, make changes to the files and make a commit
git add -A git commit -m "Message"
The git βbranchβ is just a (floating) pointer to a commit.
after the checkout Ρ
ΡΡ-ΠΊΠΎΠΌΠΌΠΈΡΠ°
command of the checkout Ρ
ΡΡ-ΠΊΠΎΠΌΠΌΠΈΡΠ°
this pointer will continue to point to the commit e
.
and you can go back at any time with the checkout ΠΈΠΌΡ-Π²Π΅ΡΠΊΠΈ
command.
and the commit you created, if you didnβt mark it with any of the pointers - a tag ( tag ) or a branch - will disappear after the next garbage collection.
Source: https://ru.stackoverflow.com/questions/964022/
All Articles