{"thread":{"id":"24152","subject":"Tracking selected files from different repository","startedAt":"2010-06-19T18:12:20Z","lastAt":"2010-06-20T08:22:17Z","messageCount":2,"participants":["jhapk","Nicolas Sebrecht"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"143945","messageId":"1276971140188-5199181.post@n2.nabble.com","threadId":"24152","inReplyTo":null,"subject":"Tracking selected files from different repository","fromName":"jhapk","fromEmail":"pradeep.kumar.jha@gmail.com","sentAt":"2010-06-19T18:12:20Z","receivedAt":"2010-06-19T18:12:20Z","isPatch":false,"sender":{"key":"pradeep.kumar.jha@gmail.com","avatar":null},"body":"\nHi,\n\nI have a source code in a repository A. A has 1000s of files.  In A, I have\nadded like 10 new files. For some reasons, I work on these 10 files in a\ndifferent repository B. Is it somehow possible that I can make only these 10\nfiles pull and push easily from my repository B? There is nothing else\ncommon between A and B, so I am not sure if putting B as a remote and making\na branch in A to track it is a feasible idea.\n\nThanks\nPradeep\n-- \nView this message in context: http://git.661346.n2.nabble.com/Tracking-selected-files-from-different-repository-tp5199181p5199181.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"143949","messageId":"20100620082217.GA13060@vidovic","threadId":"24152","inReplyTo":"1276971140188-5199181.post@n2.nabble.com","subject":"Re: Tracking selected files from different repository","fromName":"Nicolas Sebrecht","fromEmail":"nicolas.s.dev@gmx.fr","sentAt":"2010-06-20T08:22:17Z","receivedAt":"2010-06-20T08:22:17Z","isPatch":false,"sender":{"key":"nicolas.s.dev@gmx.fr","avatar":null},"body":"The 19/06/10, jhapk wrote:\n\n> I have a source code in a repository A. A has 1000s of files.  In A, I have\n> added like 10 new files. For some reasons, I work on these 10 files in a\n> different repository B. Is it somehow possible that I can make only these 10\n> files pull and push easily from my repository B? There is nothing else\n> common between A and B, so I am not sure if putting B as a remote and making\n> a branch in A to track it is a feasible idea.\n\nHaving B as a remote looks like the most convenient choice if both\nrepositories have the same history as you can then play with the usual\ngit commands: diff, log, cherry-pick, etc.\n\nOtherwise, you may either:\n- make a new B as a Git fork of A so they share history (and fallback to\n  my answer above) ;\nor\n- play with 'format-patch' and 'am' to export/import (maybe customised)\n  commits.\n\n-- \nNicolas Sebrecht\n"}]}