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.

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:

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".

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. :( :( :(

Translated with www.DeepL.com/Translator (free version)


-----Original Message-----
From: git-users@googlegroups.com <git-users@googlegroups.com> On Behalf Of 
Konstantin Khomoutov
Sent: Sunday, December 4, 2022 3:56 PM
To: git-users@googlegroups.com
Subject: Re: [git-users] Re: The git projects disappeared after the updated

On Sun, Dec 04, 2022 at 06:16:08PM +0400, Konstantin Khomoutov wrote:

> > How would it be possible to automatically move all changes in the 
> > project
> > (repository) => I mean the situation when I change/add/delete a file 
> > or directory in the project not yet perform a commit => 
> > automatically on the mirrored directory that is on OneDrive, this 
> > would be some "workaround" for the problem.
[...]
> The latter is quite doable with some tinkering.
> Basically you roll like this:

Well, it should be simpler.
Do this:

>  1. Clone your existing repository from your Git hosting provider
>     (Bitbucket?) in "mirror" mode.
> 
>     With "normal" Git this is done using
> 
>       git clone --mirror REPO_URL REPO_DIR
> 
>     The REPO_DIR directory must not be located in a directory which is under
>     control of OneDrive.
> 
>     I have no idea how to do mirror-cloning using that Bitbucket or SourceTree
>     apps.
> 
>     Also note that you must not clone a Git repository located on a
>     filesystem: while it's trivially possible in Git, the resulting repository
>     won't be configured properly.

Then change the current directory to the resulting REPO_DIR and run

  git worktree add C:\Path\To\Directory\To\Keep\Checked\Out\Files

and be done with it.
That directory in the `git worktree` command should be located in a directory 
which is under the control of OneDrive.

--
You received this message because you are subscribed to a topic in the Google 
Groups "Git for human beings" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/git-users/lD2ekpYaKF4/unsubscribe.
To unsubscribe from this group and all its topics, 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/20221204145611.5y7ltrobjsabrtgj%40carbon.

-- 
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/003b01d9097d%24bb59b240%24320d16c0%24%40gmail.com.

Reply via email to