Questions tagged [git-mirror]
28 questions
4
votes
1 answer
Git: Fork vs Mirror
What's the difference between creating a mirror and a fork. Both are copies of a repo, but is one a shallow copy (mirror) and one a deep copy (fork)? Just trying to get a better understanding for migrating a repo.

sam.hay
- 77
- 1
- 6
4
votes
1 answer
How to open repository produced by git clone --mirror
I got a git repository which was produced (and later zipped) by running command git clone --mirror. I was wondering how can I open the project in a way I could start programming with it.
Package root looks like following:
max$ tree
.
├── HEAD
├──…

eek9
- 43
- 6
3
votes
0 answers
different number of commits for "git clone" with and without "--mirror"
So while trying to migrate a repository from bitbucket to github, I followed some steps to do the following:
1- git clone --mirror
2- cd in the repo folder
3- git push --mirror
And then to make sure all my commits are…

Mohamed
- 360
- 1
- 10
3
votes
0 answers
Git Mirroring created unwanted PR refs on target repository
I have a periodic git synchronization script that runs from bit bucket cloud to our local git repository.
In the nutshell it does the following:
git clone --mirror ssh://source.git
git show-ref | cut -d ' ' -f2 | grep 'pull-request' | xargs -r -L1…

Dzerlig
- 247
- 2
- 10
2
votes
1 answer
Would `git remote add --mirror=fetch` make same repo with `git clone --mirror`?
If I want to replicate a repo, I use this.
git clone --mirror $SRC $DST
But this command requires no repo exist at $DST. It's generally okay but if I want to issue Git commands concurrently from multiple processes, it may cause some race condition…

eonil
- 83,476
- 81
- 317
- 516
2
votes
2 answers
What is better way to maintain AOSP source code in git repository
I am new to git.
We are more then 15 people working on same project.
May I know, what is the better approach to maintain AOSP source code in git repository.
I am trying to create setup Git mirror or repo.
Generally ,how people will maintain AOSP…

coder
- 59
- 13
1
vote
1 answer
Git push sync throws remote: error: refusing to delete the current default branch 'refs/heads/master'
I am trying to sync my github repo with AWS codecommit. while trying to do git push sync --mirror, I am not sure why it's trying to delete. Same code works fine for the master branch, when I shift to preprod branch it fails with the below…

Eva
- 515
- 4
- 28
1
vote
1 answer
How to make sure developers use new git remote after repository migration
Every answer about migrating git repo says:
git clone --mirror git@github/odlrepo.git
git push --mirror git@github/newrepo.git
But nobody says, what to do after...
How to force developers to use newrepo?
Solutions that I came with are:
git hook on…

ravenwing
- 668
- 3
- 20
1
vote
0 answers
Cannot trigger Jenkins MultiBranch Pipeline jobs from a git mirror
My Jenkins server is not receiving notification that the git server has changed content, and therefore not triggering the Multibranch Pipeline jobs.
The configuration is as follows:
The main git server is internet facing and running gitolite.
The…

IanGough
- 89
- 1
- 2
1
vote
1 answer
Mirror Git repositories with local changes
I would like to mirror a repository A to a repository B and make some changes on B while synchronizing all changes made to A in B. What's the best approach to do that ?
Currently, I use git-mirror to mirror the repo A and push to B. But when I fetch…

Pravine
- 9
- 2
1
vote
0 answers
Build server git mirror
Scenario
We have had (and still do have) a connectivity problem with Bitbucket where our download speed is very slow (and we have quite a large repo) and using Team City that from time-to-time likes to wipe the git repo that it downloaded, it can…

Dandré
- 2,053
- 3
- 18
- 38
0
votes
0 answers
Azure DevOps pipeline - Push automatically a branch from a repository into another one
I have a repository that's been forked several times and will continue to evolve. In the central repository, I have a release branch on which I merge when I want to deploy new features or bug fixes.
In each fork, I have a factory-update branch that…

Oliver
- 81
- 1
- 7
0
votes
1 answer
How to copy a git repo to a new repo without syncing to the original
I am attempting to take a remote repo on GHE and make a full identical copy of it in another remote repo on GHE such that cloning either one will provide the exact same local repo with indication that the other one exists. This should include all…

apexevolutionx
- 3
- 2
0
votes
1 answer
Updating mirrored Git repositories with LFS
I need to read-only mirror some Git repositories in my local network due to rather slow internet speed. Target would be to update these repositories with crontab just before office hours, so local mirrors would have fresh content at the beginning of…

Kalle
- 101
- 1
- 10
0
votes
0 answers
forking a public branch in private repo
I have the below private repo and public repo.
git@github.com:Software/AutoCock.git -> Private
git@github.com:Software/PublicProject.git -> Public
My private repo already have many files. I would like to fork one more public branch and make my…

Ahamed Kamal
- 5
- 3