Git Clone Into Another Existing Git Repo

Am I going to run into any issues if I git clone a repo into an existing git repo?

For sake of simplification, I am developing a library “lib/” that should be available to all of my projects. This is a separate git repo. I’d like to import this lib/ into all of my projects, and update it only in one place, never touch it from any of the projects, just use it.

I am assuming this is ok, just wondered if there is anything I should watch out for. Thanks!

Rebuild a GIT repo from an existing clone

I am trying to rebuild a git repo from an existing clone using the steps below: git init –bare project.git git remote add project project.git git push –all project I noticed that this does not push

Can’t clone git repo

When I try to do a git clone with the following command: git clone [email protected]:skycare/skycare.git skycare I get the following error message: Initialized empty Git repository in /media/psf

git svn – clone repo with all externals

I want to use git to clone a svn repository, but unfortunately, where svn checkout gets the repo with all externals, git svn clone only gets the repository without externals. How can I get the externa

git clone from another directory

I am new to Git and am trying to clone repo from another directory. Lets say I have one repo in C:/folder1 and C:/folder2 I want to clone the work in folder1 into folder2. What would I type into the c

Add svn repo to existing git repo?

I know you can track a svn repo with git by using git svn init, however that is for if you want to create a brand new repo. My situation is that I currently already have an existing git repo and want

Can’t clone repo using git clone git://… – ok with git clone http://

Git newbie here. I’m setting up git on a new Ubuntu VM and trying to clone some repos. The clone works for the following command: git clone (after prompt

git diffrence between clone repo and clone rep.git

is there any difference between: git clone git:// and git clone git:// I’ve seen both seams to work and I’ve seen both types in instructions.

Clone a git repo (in depth)

How to clone a repo (with libgit2) I want to do exactly what git clone does but with libgit2. What I may be asking is what git clone really does in depth. This is what I’m doing so far: Initialize a

Clone part of Git repo in another repo

I’ve got one repo which contains some utility functions in a single file. I’d like to somehow add that file to another repo, keeping the link to the old one (so I can push/pull to keep up to date with

How to clone a Git repo from a VM?

I am currently developing inside a virtual Ubuntu box with Git, and I need to clone this repo to another CentOS VM. I don’t know how to describe the git repo’s location using the [email protected]:/path.git


Just for the record, you can clone a git repo within another one:
Everything thing under your lib directory will be ignored by the enclosing Git repo, because said lib directory contains a .git.

So it would work, but the enclosing repo would have no idea:

  • it needs a lib directory from another repo
  • it needs a specific revision of that lib to build properly

Those are precisely the two informations recorded by the parent repo (the enclosing one) in order to reference a submodule.
It is made to give you access to a fixed revision of another repo within your repo, but as explained in “True nature of submodules”, that doesn’t prevent you to locally modify lib directly within your parent repo.
(As long as you commit your modifications in lib first, then go one level up back in your parent repo, and commit there as well)

The main benefit to any contributor of your main project is that, when they will clone said project, they will know they also need lib if it is declared as a submodule (as mentioned in “Git Submodule Workflow Advice“).

I’m finding that following this tutorial is helpful for understanding submodules if you don’t have much prior experience.