How do I share git code with others that have a repo?

I want to work with some Android along with others and set up a repository for local use in a team. However, it seems that repo not letting me do this. And also does not clone the git repository in the android repository:

 $ git clone /var/android/.repo/projects/bionic.git/ 

The following error message appears:

 Initialized empty Git repository in /home/user/mydroid/bionic/.git/ 0 blocks Warning: Remote HEAD refers to nonexistent ref, unable to checkout. 

Has anyone tried to successfully work in a git repository in Android along with others without sending the Android project itself?


I also tried to do the following: I initiated the client on a shared computer and locally on my computer as follows:

 $ repo init -u git://android.git.kernel.org/platform/manifest.git 

I also tried adding the remote item for a separate project (e.g. bionic) to a shared computer like this, but getting an error message:

 $ git clone /initech/android/bionic fatal: cannot clone empty repository 

I am also trying to do this as follows:

 $ git clone /initech/android/.repo/projects/bionic.git/ Initialized empty Git repository in /home/user/mydroid/bionic/.git/ 0 blocks Warning: Remote HEAD refers to nonexistent ref, unable to checkout. 

It finds the git repository, clones it, but cannot find verification links, even if there is a topic branch on the remote. What gives?

+4
source share
2 answers

I'm not sure what Repo is or does, but it seems to me that you want to clone git://android.git.kernel.org/platform/bionic.git :

 git clone --bare git://android.git.kernel.org/platform/bionic.git 

Then this clone can be cloned again:

 git clone bionic.git bionic-jim cd bionic-jim #edit git commit -a -m "foo" git push 

Changes will be carried over to ../bionic.git . Then someone should go into bionic.git and click on some upstream repository.

+4
source

The message "Warning: Remote HEAD" refers to a non-existent ref, unable to verify. "only tells you that the HEAD link does not exist, and thus Git does not know which revision to check in the local working directory. However, the .git directory is created and populated normally. Just do git checkout <whatever-branch-you-want> and start hacking.

+3
source

All Articles