How to add one repository to another repository on Github? I have one project workspace XXX and i have my own created repository YYY somewhere else, so i want to add that repo to that blank repo created.
Asked
Active
Viewed 8,839 times
1
-
1Anything apart from this? https://gist.github.com/martinbuberl/b58fd967f271f32f51f50aee62e7332c – BJha Mar 13 '19 at 11:45
-
You can pull project from first source then you can push to second source – Beyazid Mar 13 '19 at 11:50
-
3Possible duplicate of [How to import existing Git repository into another?](https://stackoverflow.com/questions/1683531/how-to-import-existing-git-repository-into-another) – Nino Filiu Mar 13 '19 at 12:26
2 Answers
1
Here is simple way I can think of
- Clone the xxx repository
- open it and delete
.git
folder - open terminal and type
git init
- type command
git remote add origin GIT_URL_OF_YYY
- add , commit and push

Manohar
- 22,116
- 9
- 108
- 144
-
Any idea how to manage/best practice of keeping the multiple repositories(Microservices) in GitHub – Girish Jul 15 '21 at 16:18
0
You could do this with simple two steps :
- clone {current}
- push {new}
A. clone {current} git clone
- create local directory
- open terminal
git clone ssh://john@example.com/path/to/my-project.git
cd my-project
B. push {new} git push <remote> <branch>
git remote add origin example.com/path/to/my-project.git
git push origin master
- you may face an error of repo{s} timing, so.. you may need to fore pushing
- and you may face some other problems then you will just run
git add .
git commit -m "first lanuch"
git push -u origin master

Mohamed Sayed
- 11
- 1