On Tue, Dec 06, 2022 at 03:19:19PM +0100, rozanski.s...@gmail.com wrote:

> First I did a "simple" clone from within Sourcetree to a "local" location -
> executed correctly, showed the repo in the application - great. I executed
> git worktree add ...... - .git .gitign README.md files appeared in the
> target directory -> everything is correct, because that's all there is in
> this project.

I'm not sure I follow because I think I fail to unambiguously interpret what
does «"simple" clone from within SourceTree» means.

What I intended to convey in my previous mails to this thread is that

 1. You should not clone a Git repository located on a local filesystem.
    Clone the replica of such repository hosted by your Git hosting provider.
    To say that in some other words, "clone form the cloud", "clone from
    the server".

 2. The repository should be cloned in the "mirror" mode.
    As I've originally stated, I have no idea whether the tools you're using
    can do that. You cannot "just" clone, and I have gone to great length
    (I think) to underline that [*].

So, let's start with this: were both these requirements fulfilled?

> The problem is that "it doesn't work anyway". - I can make any changes to
> the project in PHPStorm (change the contents of the files, add) - and still
> it does not show in "changes" . The (physical) files of the project are not
> visible - you can't add them to the repository (it was never like that). 
> 
> Since it doesn't work, I deleted everything and executed git clone --mirror
> from "Git CMD". -> it executed. Then git worktree add - also executed but:

OK, I see. This sounds correct.

> PHPStorm shows an error all the time:
> "The directory "LOCAL_DIR" is registered as a Git root, but no Git 
> repositories were found there. 
> As if it doesn't see the result of "git worktree add".

Have you verified "normal" Git command work?

I mean, forget about PHPStorm for a moment; it's a bit puzzling for me that
while you appear to be a software developer, for some reason you appear to
consistently avoid the first and foremost technique for problem solving in
engineering: partitioning the problem space. We cannot reliably know who's the
culprit: PHPStorm or some mishap while setting up a Git repository. Hence we
have to first verify plain Git works OK on the new repo - that is, all regular
commands work:

  - git status
    Shows the state of the uncommitted changes.

  - git log

  - git add
    To add the changes made to a local file to the index - what will become
    the contents of the new commit.

  - git commit
    Well, this records a commit.

If these commands work, you can be sure Git is OK, and can go elsewhere to
some PHPStorm support venue to ask an educated question about why it fails to
work with a Git repo set like this. I cannot forsee the outcome, really.
Maybe its some misconfiuration in PHPStorm, maybe it for some reason does not
support detached Git trees (even though it's a stock Git feature for many
years already), maybe you need to upgrade.

> Gee, how beautiful it was when everything worked before - I don't know if I
> won't go back to the old version and stay as long as possible. :( :( :(

I sympathize you but I don't get the reason for the lamenting: as you should
have learned from this thread, your setup was likely "backing up" already
broken files, and you might have had silent corruption of your repositories
already, just they were _silent._

Well, consider it alike to a medical doctor telling you that you should quit
drinking because your liver is about to fail, and maybe was already failing,
and you're now lamenting that the world was brighter while you were drinking
;-) OK, sure if you're fine with possible liver corruption - by all means, go
on with your conventional life style - it's your choice; if, instead, you lean
on the safe side, then face the new state of things, and spend an effort to
deal with them - even though you understandably would prefer not to.


[*] I cannot help you dealing with your preferred tooling as it does not
    intersect with that of mine, and the time budget I'm willing to spend
    to help people here and elsewhere is limited, so I'm reluctant to
    googling or asking on revelant forums instead of you, and also I'm
    reluctant to mess with installing these pieces of software to explore
    them directly in an attempt to learn what level of support advanced
    cloning they have (this would require me to mess with Windows emulation,
    after all, as I have no access to machines running Windows).

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/20221208113321.73mhlh62pdv3fa7e%40carbon.

Reply via email to