Eu não entendo que acontece com um branch desanexado e o que eu posso fazer com ele ?
Desenvolvimento@DESKTOP-KB3DLRP MINGW64 ~/Documents/treino-git/andre ((bd4ace0...))
$ git status
HEAD detached at bd4ace0
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: index1.html
no changes added to commit (use "git add" and/or "git commit -a")
A hash bd4ace0 virou um novo branch ?
Desenvolvimento@DESKTOP-KB3DLRP MINGW64 ~/Documents/treino-git/andre ((bd4ace0...))
$ git add .
Desenvolvimento@DESKTOP-KB3DLRP MINGW64 ~/Documents/treino-git/andre ((bd4ace0...))
$ git commit -m"Uso do histórico"
[detached HEAD e71db9a] Uso do histórico
1 file changed, 2 insertions(+), 2 deletions(-)
Desenvolvimento@DESKTOP-KB3DLRP MINGW64 ~/Documents/treino-git/andre ((e71db9a...))
$ git log --oneline
e71db9a (HEAD) Uso do histórico
bd4ace0 Iniciando página
64af31f Alterando o nome
7c5d356 Adicionando a Joice
70cf6ec Adicionando o Andre
6203922 Adicionando ao git-hub
Desenvolvimento@DESKTOP-KB3DLRP MINGW64 ~/Documents/treino-git/andre (master)
$ git checkout e71db9a
Note: switching to 'e71db9a'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at e71db9a Uso do histórico