> On Fri, Apr 14, 2023 at 04:38:34PM +0200, Uwe Brauer wrote:

> Well, your approach is incorrect. ;-)
> A correct one is going to be quicker, too.

> As I've explained in this list in the past, _by default_ Git implements
> asymmetric approach to handling remote repositories and branches they
> contain - you might want to re-read [1] and may be the whole thread; may be
> this idea will now have greater chances to really sink in as you will be
> able to compare and contrast "normal" clone and "mirror" clone.

> OK, a quick refresher on that asynchronous nature of "normal" Git repos.
> Even if you bring to life some local repository by cloning an already existing
> one, and intend to only communicate with that "origin" repository, Git does
> not really somehow establish such one-to-one relation between these two repos.
> A branch named "foo" in your local repository is still your local "foo", and,
> say, it won't be automatically updated when you fetch from the remote, and it
> won't be deleted if it's deleted on the remote.

> If you need mirroring, you're going to use mirroring, which sets up the clone
> in a way so that local "refs" (branches and tags) are always _replaced_ by the
> changes done on the mirrored remote repo, and then in the cloned repo you add
> another remote - for your GitLab-hosted repository - also instructing Git to
> do "mirror pushes". Here's how:

>  1. Clone the original repo:

>       git clone --mirror o...@git.code.sf.net/p/matlab-emacs/src

>     Note that a bare repository is created. That means, it has no work tree
>     (no checked out files).

I just realized another issue (for the future):

suppose, I (and all the
other maintainers)

Then it would be sufficient to do 
mkdir .git
mv all the stuff to the .git directory 
run 

git config --local --bool core.bare false

git reset --hard

Right?

I never have really used them. 
But then still of course 
 copyright
  documentation
  fontlockhang
  hairyblocks
  mac_init
* master
  modernize
  shellcomplete
  strings
  usage1
  wisent-parser


So it might be better to clone from gitlab the repository without the
mirror option, looks cleaner.

Ok I broke my promise and did not read the thread again.

Good night

Uwe 

-- 
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/878reui41r.fsf%40mat.ucm.es.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to