{"thread":{"id":"16603","subject":"Using repo to work with multiple GIT repositories","startedAt":"2008-12-05T11:20:24Z","lastAt":"2008-12-08T16:23:40Z","messageCount":2,"participants":["kanagesh radhakrishnan","Shawn O. Pearce"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"97203","messageId":"ece1079f0812050320n7191097sbc1c10c353b23708@mail.gmail.com","threadId":"16603","inReplyTo":null,"subject":"Using repo to work with multiple GIT repositories","fromName":"kanagesh radhakrishnan","fromEmail":"rkanagesh@gmail.com","sentAt":"2008-12-05T11:20:24Z","receivedAt":"2008-12-05T11:20:24Z","isPatch":false,"sender":{"key":"rkanagesh@gmail.com","avatar":null},"body":"Hello All,\n\nMy work currently resides in four different source trees, namely:\n\n   * bootloaders   (git://192.168.10.1/bootloaders)\n   * kernel           (git://192.168.10.1/kernel)\n   * applications  (git://192.168.10.1/apps)\n   * build             (git://192.168.10.1/build)\n\nI maintain them as four different git repositories.  They are hosted\non a local server enabling any other developer to be able to clone\nfrom one of the trees, make changes, commit locally and then push to\nthe git server.\n\nI was browsing through the Android source code and found that they\nhave a similar situation where code is maintained in a large number of\nindependent GIT repositories.  The tool 'repo' is being used to\ninitialize and sync each tree.\n\nI have been trying to bring in this approach to maintain my work too.\nI have had success to some extent :-) I have created a manifest.git\nand repo.git in my local server.  The default.xml file being\nmaintained in manifest.git has a list of the GIT repositories being\nhosted by my local GIT server.\n\nIn order to clone the four GIT trees from the server, I do the following:\n\n   $ repo init -u git://192.168.10.1/manifest.git\n   $ repo sync\n\nThis clones from the four source trees maintained in the GIT server.\n\nI am able to make changes locally in each tree and commit them.\nHowever, when I attempt to push the commits to the main repository on\nthe GIT server, it always says that 'everything is up to date'\n\n   $ git push user@192.168.10.1:/home/git/applications\n   user@192.168.10.1's password:\n   Everything up-to-date\n\nFurther, when I try to pull in any recent updates with the git-pull\ncommand, I get the following error:\n\n   $ git-pull\n   fatal: 'origin': unable to chdir or not a git archive\n   fatal: The remote end hung up unexpectedly\n\nI know pushing to the repository on the GIT server works since I am\nable to push local commits when I have cloned the working copy\nmanually (instead of using repo init and repo sync).\n-----------------------------------------------------------------\n   $ git-clone git://192.168.10.1/applications\n   Initialized empty Git repository in /home/user/work/applications/.git/\n   remote: Counting objects: 6857, done.\n   remote: Compressing objects: 100% (3805/3805), done.\n   remote: Total 6857 (delta 2943), reused 6853 (delta 2941)\n   Receiving objects: 100% (6857/6857), 9.51 MiB | 10547 KiB/s, done.\n   Resolving deltas: 100% (2943/2943), done.\n   $\n\n   <edit, make changes, save, commit changes locally>\n\n   $ git-commit -a -m \"Changed rule to build with custom tools\"\n   Created commit bd55a06: Changed rule to build with custom tools\n   1 files changed, 1 insertions(+), 1 deletions(-)\n   $\n\n   <push changes to repository on GIT server>\n   $ git-push user@192.168.10.1:/home/git/applications\n   user@192.168.10.1's password:\n   Counting objects: 8, done.\n   Compressing objects: 100% (6/6), done.\n   Writing objects: 100% (6/6), 611 bytes, done.\n   Total 6 (delta 4), reused 0 (delta 0)\n   To user@192.168.10.1:/home/git/applications\n   dce4bea..bd55a06  master -> master\n   $\n-----------------------------------------------------------------\n\nMay I know what I have to look at to solve this problem?  Has anyone\nfaced a similar problem?  Any pointers would be of help.\n\nThanks in advance.\n\nRegards,\nKanagesh\n"},{"id":"97353","messageId":"20081208162340.GE31551@spearce.org","threadId":"16603","inReplyTo":"ece1079f0812050320n7191097sbc1c10c353b23708@mail.gmail.com","subject":"Re: Using repo to work with multiple GIT repositories","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-12-08T16:23:40Z","receivedAt":"2008-12-08T16:23:40Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"kanagesh radhakrishnan <rkanagesh@gmail.com> wrote:\n> \n> My work currently resides in four different source trees, namely:\n> \n>    * bootloaders   (git://192.168.10.1/bootloaders)\n>    * kernel           (git://192.168.10.1/kernel)\n>    * applications  (git://192.168.10.1/apps)\n>    * build             (git://192.168.10.1/build)\n> \n> I maintain them as four different git repositories.  They are hosted\n> on a local server enabling any other developer to be able to clone\n> from one of the trees, make changes, commit locally and then push to\n> the git server.\n> \n> I was browsing through the Android source code and found that they\n> have a similar situation where code is maintained in a large number of\n> independent GIT repositories.  The tool 'repo' is being used to\n> initialize and sync each tree.\n\nFWIW this was cross-posted to repo-discuss, which is possibly\nbetter suited to discussion about \"repo\".  :-)\n\nI posted my answer there this morning:\n\nhttp://groups.google.com/group/repo-discuss/browse_thread/thread/67fdbba9619084\n\n-- \nShawn.\n"}]}