[Vm-dev] reattaching a detatched git head...

Nicolas Passerini npasserini at gmail.com
Wed Oct 12 09:01:44 UTC 2016

If you do

git reset --soft refs/heads/master

That will leave you in a state in which
- your current branch is master again
- you still have all your files.

There you can commit onto master.

Another posibility (maybe tidier) is to do that in another branch, so first:

git co -b new-branch-name
git add ...
git commit ...

and after you have everything working you go back and update master:
git co master
git merge new-branch-name

On Wed, Oct 12, 2016 at 10:40 AM, Jakob Reschke <
jakob.reschke at student.hpi.de> wrote:

> To determine the correct/best course of action, it might also help to see
> what happened or where your detached head actaully is (oh, the plethora of
> possible puns!). You can look at the history graph with `gitk --all` (it
> should come with git). You can also create, checkout and move branches
> around there or do things like cherry picking, maybe even merging, not sure
> atm.
> Am 12.10.2016 03:21 schrieb "John McIntosh" <johnmci at smalltalkconsulting.
> com>:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20161012/81577c2f/attachment.htm

More information about the Vm-dev mailing list