* index file list files not found in working tree
@ 2015-08-24 10:34 Rafik E Younan
2015-08-25 10:16 ` Rafik E Younan
0 siblings, 1 reply; 4+ messages in thread
From: Rafik E Younan @ 2015-08-24 10:34 UTC (permalink / raw)
To: git
Hi,
After several merges and rebases I finally got my branches and history
to reflect valid commits and proper history. Everything is pushed to
internal bare repo and the remotes seems OK.
When I clone the updated repository, all branches reflect the correct
updated trees and blobs.
The problem occurs only on the original local repository where all the
merging and re-basing took place!
When I checkout a branch, several files and folders are deleted from the
working tree. When I examine the history of these files, there are only
commits of adding them and modifying them but no log for deleting them,
and they aren't deleted when I checkout the same branch in another fresh
cloned repo.
Git status command doesn't indicate any changes in these files. I found
the files and folders names in the `.git/index` file. So after manually
removing the `.git/index` file and usinge `git reset` command, `git
status` indicates that the files and folders are deleted.
I use `git checkout -- <File_or_folder_names>...` and restore all
missing files and folders, just then the working tree matches the fresh
checkout of the same branch on any other cloned repo.
After examining the tree object of the current commit, all files and
folders exists, although clearly the checkout missed some of them!
Because the repository is local and private, I can't share any url for
publicly accessible repository, and if one exists, no problem could be
found, because the problem resides in just this certain local clone.
Answering the following questions might give some clues for the problem:
* How does git populate the index file after every branch checkout?
* Is there any object to reflect the content of the index file?
I would appreciate any pointers for where the problem could be.
Thanks,
Rafik
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: index file list files not found in working tree
2015-08-24 10:34 index file list files not found in working tree Rafik E Younan
@ 2015-08-25 10:16 ` Rafik E Younan
2015-08-25 10:32 ` John Keeping
0 siblings, 1 reply; 4+ messages in thread
From: Rafik E Younan @ 2015-08-25 10:16 UTC (permalink / raw)
To: git
Hi,
I got a recommendation to use reset --hard. I tried it and it says the
HEAD is now at correct commit, but missing files are not restored!
I tried `ls-tree --name-only` and it lists missing files and folders,
but the actual working tree doesn't have these files and folders.
The question I'd like to answer, how does git generates the `index` file
between checkouts?
Thanks,
Rafik
On 08/24/2015 12:34 PM, Rafik E Younan wrote:
> Hi,
>
> After several merges and rebases I finally got my branches and history
> to reflect valid commits and proper history. Everything is pushed to
> internal bare repo and the remotes seems OK.
>
> When I clone the updated repository, all branches reflect the correct
> updated trees and blobs.
>
> The problem occurs only on the original local repository where all the
> merging and re-basing took place!
>
> When I checkout a branch, several files and folders are deleted from
> the working tree. When I examine the history of these files, there are
> only commits of adding them and modifying them but no log for deleting
> them, and they aren't deleted when I checkout the same branch in
> another fresh cloned repo.
>
> Git status command doesn't indicate any changes in these files. I
> found the files and folders names in the `.git/index` file. So after
> manually removing the `.git/index` file and usinge `git reset`
> command, `git status` indicates that the files and folders are deleted.
>
> I use `git checkout -- <File_or_folder_names>...` and restore all
> missing files and folders, just then the working tree matches the
> fresh checkout of the same branch on any other cloned repo.
>
> After examining the tree object of the current commit, all files and
> folders exists, although clearly the checkout missed some of them!
>
> Because the repository is local and private, I can't share any url for
> publicly accessible repository, and if one exists, no problem could be
> found, because the problem resides in just this certain local clone.
>
> Answering the following questions might give some clues for the problem:
> * How does git populate the index file after every branch checkout?
> * Is there any object to reflect the content of the index file?
>
> I would appreciate any pointers for where the problem could be.
>
> Thanks,
> Rafik
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: index file list files not found in working tree
2015-08-25 10:16 ` Rafik E Younan
@ 2015-08-25 10:32 ` John Keeping
2015-08-25 14:50 ` Rafik E Younan
0 siblings, 1 reply; 4+ messages in thread
From: John Keeping @ 2015-08-25 10:32 UTC (permalink / raw)
To: Rafik E Younan; +Cc: git
On Tue, Aug 25, 2015 at 12:16:43PM +0200, Rafik E Younan wrote:
> I got a recommendation to use reset --hard. I tried it and it says the
> HEAD is now at correct commit, but missing files are not restored!
>
> I tried `ls-tree --name-only` and it lists missing files and folders,
> but the actual working tree doesn't have these files and folders.
Is there any chance that you have enabled sparse checkouts? See the
documentation at the bottom of git-read-tree(1).
> On 08/24/2015 12:34 PM, Rafik E Younan wrote:
> > Hi,
> >
> > After several merges and rebases I finally got my branches and history
> > to reflect valid commits and proper history. Everything is pushed to
> > internal bare repo and the remotes seems OK.
> >
> > When I clone the updated repository, all branches reflect the correct
> > updated trees and blobs.
> >
> > The problem occurs only on the original local repository where all the
> > merging and re-basing took place!
> >
> > When I checkout a branch, several files and folders are deleted from
> > the working tree. When I examine the history of these files, there are
> > only commits of adding them and modifying them but no log for deleting
> > them, and they aren't deleted when I checkout the same branch in
> > another fresh cloned repo.
> >
> > Git status command doesn't indicate any changes in these files. I
> > found the files and folders names in the `.git/index` file. So after
> > manually removing the `.git/index` file and usinge `git reset`
> > command, `git status` indicates that the files and folders are deleted.
> >
> > I use `git checkout -- <File_or_folder_names>...` and restore all
> > missing files and folders, just then the working tree matches the
> > fresh checkout of the same branch on any other cloned repo.
> >
> > After examining the tree object of the current commit, all files and
> > folders exists, although clearly the checkout missed some of them!
> >
> > Because the repository is local and private, I can't share any url for
> > publicly accessible repository, and if one exists, no problem could be
> > found, because the problem resides in just this certain local clone.
> >
> > Answering the following questions might give some clues for the problem:
> > * How does git populate the index file after every branch checkout?
> > * Is there any object to reflect the content of the index file?
> >
> > I would appreciate any pointers for where the problem could be.
> >
> > Thanks,
> > Rafik
> >
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: index file list files not found in working tree
2015-08-25 10:32 ` John Keeping
@ 2015-08-25 14:50 ` Rafik E Younan
0 siblings, 0 replies; 4+ messages in thread
From: Rafik E Younan @ 2015-08-25 14:50 UTC (permalink / raw)
To: John Keeping; +Cc: git
On 08/25/2015 12:32 PM, John Keeping wrote:
> On Tue, Aug 25, 2015 at 12:16:43PM +0200, Rafik E Younan wrote:
>> I got a recommendation to use reset --hard. I tried it and it says the
>> HEAD is now at correct commit, but missing files are not restored!
>>
>> I tried `ls-tree --name-only` and it lists missing files and folders,
>> but the actual working tree doesn't have these files and folders.
> Is there any chance that you have enabled sparse checkouts? See the
> documentation at the bottom of git-read-tree(1).
>
>
There was `.git/info/sparse-checkout` file in the local repo, but not in
other cloned repo. I remove the file, the `.git/index` and did reset
--hard, and all seems works now.
Thanks for your help.
Git community rocks!
Regards,
Rafik
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-08-25 14:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-24 10:34 index file list files not found in working tree Rafik E Younan
2015-08-25 10:16 ` Rafik E Younan
2015-08-25 10:32 ` John Keeping
2015-08-25 14:50 ` Rafik E Younan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).