threads / discuss / 19927

git in emacs

Subject: git in emacs

## tl;dr

4 messages between Jun 25, 2009 and Jun 29, 2009.

replies: 3people: 3as markdown or json

Rustom Mody· Jun 25, 2009, 12:35 UTC · lore
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· Jun 25, 2009, 12:59 UTC · re: Rustom Mody · lore

Re: git in emacs

Rustom Mody <rustompmody@gmail.com> writes:
Show 12 quoted lines
> 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.

Show 8 quoted lines
> 
> 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· Jun 25, 2009, 13:13 UTC · re: Jakub Narebski · lore

Re: git in emacs

On Thu, Jun 25, 2009 at 6:29 PM, Jakub Narebski<jnareb@gmail.com> wrote:
Show 17 quoted lines
> 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 :-(

Show 17 quoted lines
>
>>
>> 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· Jun 29, 2009, 19:50 UTC · re: Rustom Mody · lore

Re: git in emacs

Rustom Mody <rustompmody@gmail.com> writes:
Show 7 quoted lines
> 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

← back to recent threads