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 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/20221204145611.5y7ltrobjsabrtgj%40carbon.

Reply via email to