0

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 private changes, visible only to all those who has access to my private repo. I wanted to pull the all the latest changes from public branch frequently as well. Note: I don't have plans to merge all my private repo changes to public branch.

I followed this thread How to have a public/private git repository with pull request among the two

so I tried these commands,

git clone --bare git@github.com:Software/PublicProject.git
cd PublicProject.git
git push --mirror git@github.com:Software/AutoCock.git

but got the below error

Counting objects: 37721, done.
Delta compression using up to 128 threads.
Compressing objects: 100% (8155/8155), done.
Connection reset by 140.82.114.4 port 220 KiB | 1024 bytes/s
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly

Need a help, getting familiar on git, so what is the best way I can incorporate this ?

LeGEC
  • 46,477
  • 5
  • 57
  • 104
  • 1
    Does this answer your question? [Git, fatal: The remote end hung up unexpectedly](https://stackoverflow.com/questions/15240815/git-fatal-the-remote-end-hung-up-unexpectedly) – Martin Jul 12 '22 at 15:00
  • That `git push --mirror` command only makes sense if you want `AutoCock.git` to be an exact copy of `PublicProject.git` and then add stuff to it. But if you already have stuff there, I would not do this operation. – joanis Jul 12 '22 at 17:22
  • Instead, just push the branches from PublicProject that you want in AutoCock, and be careful that they don't have the same names as existing branches already there. You might want to choose new names for those branches if there are collisions. – joanis Jul 12 '22 at 17:23
  • yes just pushing is better and worked – Ahamed Kamal Jul 12 '22 at 21:07

0 Answers0