On Sun, Dec 04, 2022 at 04:00:36PM +0400, Konstantin Khomoutov wrote:

[...]
> > That is to say, I already have the culprit - in earlier versions of Git I
> > could keep repositories in OneDrive without any problem and everything
> > worked fine, but now it is throwing errors :( :( :( :(.
> > 
> > Any ideas?
> 
> Git never supported keeping its repositores on non-local filesystems such as
> OneDrive (or whatever other "cloud" drive or networked filesystems such as NFS
> or CIFS/Samba). It does have some hacks and kludges to facilitate working on
> _some_ of them, but it's never guaranteed. This is not some whimsical decision
> of the Git's creators: such filesystems, while called that, do not implement
> (or do not implement properly) many aspects of the behavior of "real"
> filesystems Git relies on to work properly.
> 
> The best way to maintain an offline ("in the cloud") copy of a normal local
> repository is using the `git bundle` command and have the cloud software sync
> the produced single file - a bundle - to the cloud.

You might find this thread [1] on the main Git mailing list to be of interest:
it discusses a proposed patch to the Git's official FAQ to deal precisely
with your problem. In particular, these bits:

| In no circumstances should you share a working tree or bare repository using
| a cloud syncing service or store it in a directory managed by such a
| service. Such services sync file by file and don't maintain the invariants
| required for repository integrity; in addition, they can cause files to be
| added, removed, or duplicated unexpectedly.  If you must use one of these
| services, use it to store the repository in a tar archive instead.

and 

| * We prefer push/pull/bundle to copy/replicate .git content
|
| <...>
|
| * Anything which copies .git data on a concurrently updated repo can
|   lead to corruption, whether that's cp -R, rsync with any combination
|   of flags, some cloud syncing service that expects to present that
|   tree to two computers without guaranteeing POSIX fs semantics between
|   the two etc.

I understand this might sound like gobbledygook to you, so it it does, just
perceive it as "the Git devs say Git won't work properly on filesystems which
are synchronized to the cloud using cloud service providers' software".

 1. http://public-inbox.org/git/87eeh0l52n....@evledraar.gmail.com/

-- 
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/20221204121216.cvgtrwy7c2b77e4m%40carbon.

Reply via email to