Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cannot git pull the Gentoo repo
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Andrey Grozin
n00b
n00b


Joined: 12 Nov 2015
Posts: 11

PostPosted: Sun Feb 02, 2025 7:38 am    Post subject: cannot git pull the Gentoo repo Reply with quote

Today I've got an unexpected problem. As usual, I said `git pull` in the directory with the Gentoo repo. All changed ebuilds etc. were obtained. But at the end `git` produced an error message that `.git/HEAD.lock` exists. Maybe, `git` has terminated abnormally last time. Well, maybe, I don't remember. But currently there is no `.git/HEAD.lock`. When I say `git pull` I get
Code:

error: cannot pull with rebase: Your index contains uncommitted changes.
error: Please commit or stash them.

`git status` produces zillion uncommitted changes - all changes downloaded today, before this error message about `.git/HEAD.lock` appeared.

How can I return this git directory to a usable state?
Back to top
View user's profile Send private message
Banana
Moderator
Moderator


Joined: 21 May 2004
Posts: 1872
Location: Germany

PostPosted: Sun Feb 02, 2025 8:40 am    Post subject: Reply with quote

Hmm. First, privide some more information.

What is the location/path of this repo?
What is the output of emerge --info?
What is your update command and sync command?
Is this an official gentoo repo?
_________________
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Back to top
View user's profile Send private message
sMueggli
Guru
Guru


Joined: 03 Sep 2022
Posts: 538

PostPosted: Sun Feb 02, 2025 8:59 am    Post subject: Reply with quote

With
Code:
git reset --hard


If the problem reappears, you should investigate why that happens.
Back to top
View user's profile Send private message
Andrey Grozin
n00b
n00b


Joined: 12 Nov 2015
Posts: 11

PostPosted: Sun Feb 02, 2025 10:05 am    Post subject: Reply with quote

[quote="sMueggli"]With
Code:
git reset --hard

Thank you very much, it works.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum