Luke Puplett
Luke Puplett

Reputation: 45263

Git and shared projects

I'm new to Git. I work in Visual Studio.

Solution
- Phone App, refs Orange and Cabbage
- Shared Lib Orange
- Shared Lib Strawberry
- Shared Lib Cabbage, refs Strawberry

Each of these should be in different repositories. I'd like the shared libs to trigger builds on TeamCity that publish them on NuGet so my other apps update from the feed when they're built next.

Is there a special way to manage this in Git or shall I just pull them all into the App solution and run a batch file to commit them all together?

I have yysun's Git add-in installed in the VS IDE but it only controls the app's repo, so I will have to setup a macro or pin a taskbar button to commit on all repos.

My question is this: considering the normal everyday-ness of this arrangement, is there not some simple setup I can do in Git to support this without having to spend 20% of my programming day issuing DOS commands in the right order?

Upvotes: 0

Views: 572

Answers (2)

Mark Leighton Fisher
Mark Leighton Fisher

Reputation: 5703

You might want to check out Using Git with Visual Studio.

Also, if your workflow lets you deal with only the Git-tracked files (at least most of the time), then git commit -a will stage & commit all Git-tracked files in the repo at once, thereby reducing your commit for each repo down to a single, repeatable command-line command.

Upvotes: 1

Atropo
Atropo

Reputation: 12561

Seems like git submodules could be a good solution.

Upvotes: 1

Related Questions