# git in emacs

4 messages from 2009-06-25 to 2009-06-29. Participants: Rustom Mody, Jakub Narebski, Alexandre Julliard.
Thread: https://gitlist.dev/t/19927

## Rustom Mody, 2009-06-25 12:35

Subject: git in emacs
Message-ID: <f46c52560906250535k6a0eb0a5ne05dc327760d14bd@mail.gmail.com>
URL: https://gitlist.dev/e/f46c52560906250535k6a0eb0a5ne05dc327760d14bd%40mail.gmail.com

```
Ive been trying to use git.el in emacs

When I checked out an internal commit (I guess that's called a
detached head?) then git-status (in emacs) starts giving me

Branch:     fatal: ref HEAD is not a symbolic ref

This goes away when I do
git reset --hard <original-head-sha> --
git checkout master

[I'm not sure this the best way of restoring the head]

But my question is more about git in emacs. I gather that there are 3 options:
1. git.el
2. vc with git backend
3. dvc with git backend

Which is best/preferable?
Or is it best to stay with the command line?

```

## Jakub Narebski, 2009-06-25 12:59

Subject: Re: git in emacs
Message-ID: <m3bpocxyf4.fsf@localhost.localdomain>
URL: https://gitlist.dev/e/m3bpocxyf4.fsf%40localhost.localdomain
In-Reply-To: <f46c52560906250535k6a0eb0a5ne05dc327760d14bd@mail.gmail.com>

```
Rustom Mody <rustompmody@gmail.com> writes:

> Ive been trying to use git.el in emacs
> 
> When I checked out an internal commit (I guess that's called a
> detached head?) then git-status (in emacs) starts giving me
> 
> Branch:     fatal: ref HEAD is not a symbolic ref
> 
> This goes away when I do
> git reset --hard <original-head-sha> --
> git checkout master
> 
> [I'm not sure this the best way of restoring the head]

This probably means that git.el (which version do you use) should 
be corrected.

> 
> But my question is more about git in emacs. I gather that there are 3 options:
> 1. git.el
> 2. vc with git backend
> 3. dvc with git backend
> 
> Which is best/preferable?
> Or is it best to stay with the command line?

See http://www.emacswiki.org/emacs-en/Git

-- 
Jakub Narebski
Poland
ShadeHawk on #git

```

## Rustom Mody, 2009-06-25 13:13

Subject: Re: git in emacs
Message-ID: <f46c52560906250613l3759375dk855632b255ddc6e8@mail.gmail.com>
URL: https://gitlist.dev/e/f46c52560906250613l3759375dk855632b255ddc6e8%40mail.gmail.com
In-Reply-To: <m3bpocxyf4.fsf@localhost.localdomain>

```
On Thu, Jun 25, 2009 at 6:29 PM, Jakub Narebski<jnareb@gmail.com> wrote:
> Rustom Mody <rustompmody@gmail.com> writes:
>
>> Ive been trying to use git.el in emacs
>>
>> When I checked out an internal commit (I guess that's called a
>> detached head?) then git-status (in emacs) starts giving me
>>
>> Branch:     fatal: ref HEAD is not a symbolic ref
>>
>> This goes away when I do
>> git reset --hard <original-head-sha> --
>> git checkout master
>>
>> [I'm not sure this the best way of restoring the head]
>
> This probably means that git.el (which version do you use) should
> be corrected.

Ok So I had an old version
Now its version 1.0
But I still get the same error :-(
>
>>
>> But my question is more about git in emacs. I gather that there are 3 options:
>> 1. git.el
>> 2. vc with git backend
>> 3. dvc with git backend
>>
>> Which is best/preferable?
>> Or is it best to stay with the command line?
>
> See http://www.emacswiki.org/emacs-en/Git
>
> --
> Jakub Narebski
> Poland
> ShadeHawk on #git
>

```

## Alexandre Julliard, 2009-06-29 19:50

Subject: Re: git in emacs
Message-ID: <87prcmyg3v.fsf@wine.dyndns.org>
URL: https://gitlist.dev/e/87prcmyg3v.fsf%40wine.dyndns.org
In-Reply-To: <f46c52560906250613l3759375dk855632b255ddc6e8@mail.gmail.com>

```
Rustom Mody <rustompmody@gmail.com> writes:

> On Thu, Jun 25, 2009 at 6:29 PM, Jakub Narebski<jnareb@gmail.com> wrote:
>> This probably means that git.el (which version do you use) should
>> be corrected.
>
> Ok So I had an old version
> Now its version 1.0
> But I still get the same error :-(

The version number isn't helpful I'm afraid, they are all called 1.0...

You probably still have an old version, detached head support was added
quite some time ago. You can get the latest version from the git source
tree.

-- 
Alexandre Julliard
julliard@winehq.org

```
