setting up TeamCity to pull multiple git repos with named locations

I am having a problem creating a TeamCity project build that relies on two git repos. In particular, there is content in a primary that relies on a shared repo. This isn’t ideal and needs to change (aka pushing all shared components into nuget), but first things first.

The build machine needs two sibling checkout folders: ‘Project’ and ‘Shared’. Then, from the ‘Project’ folder, I want to kick off a rake task.

  • .gitignore not ignoring filenames with spaces in them on `git status`
  • Automatically deploying assets to Rackspace CDN via git and updating references to those assets?
  • How to disable sparse checkout after enabled?
  • Jenkins “Git plugin” neither ignores commits with certain messages nor commits with from certain users
  • Git replication across several live servers
  • Print branch description
  • Teamcity seems to pull the first ‘Project’ repo, checksout to the /work folder then deletes it and replaces it with a checkout from the ‘Shared’ repo.

    Any ideas on how to get this pulling properly?

    Thank you,
    -Steve

  • Introduction to Git and practical usage patterns
  • How can I search a word in Git repo over the whole history?
  • Can I just copy .git to another directory?
  • Git shortcut to get unmerged paths in prompt
  • rollback to original state after git revert
  • Syntax to submit single git commit to Review Board using post-review
  • 2 Solutions collect form web for “setting up TeamCity to pull multiple git repos with named locations”

    I found that I can move the entire tree by setting the VCS Root ‘Checkout rules’ on the repository definition by using the following rule entry:

    +:.=>./Shared
    

    This rule says effectively “for the root folder of this repository and everything under it, move it all under a folder called ‘Shared’.

    I then do the same for the ‘Project’ repo, moving it to the ‘Project’ folder and I now have two discrete sibling folders setup under the workspace at build time.

    I did not get much from your question. What I understood is that you have code in 2 repos and you want to pull them into a single folder. In such situation I would either use git submodules or git subtree merge.

    Reference at http://git-scm.com/book/en/Git-Tools-Submodules

    Submodules: Chapter 6.6

    Subtree Merging: Chapter 6.7

    Git Baby is a git and github fan, let's start git clone.