git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* GIT and Cloning Remote Repositories into "Local Remote" Repositories
@ 2010-09-21  1:22 Grant Erickson
  2010-09-21  1:37 ` Casey Dahlin
  2010-09-21  4:26 ` Tay Ray Chuan
  0 siblings, 2 replies; 6+ messages in thread
From: Grant Erickson @ 2010-09-21  1:22 UTC (permalink / raw)
  To: git

I'm still in the stage of using GIT where I "know enough to be dangerous".
That said, I am trying to set something up and get it "right" to avoid pain
later. However, after reading GIT online help and various FAQs, it is still
unclear what the right thing or steps to perform are.

Here's the scenario:

1) I have a private repository set-up at GitHub that I can commit, push and
pull to my heart's content. This is all working well.

2) I now need to import some third-party software, two packages in
particular (U-Boot and Linux), at specific tags into subdirectories within
my repository in (1).

3) Changes in these subdirectories in (2) should ONLY go to GitHub but NEVER
to the origin of the clone UNLESS the user (usually me) really knows what
he/she is doing.

I know how to use 'git clone' to clone a remote repository and make local
commits there; however, what I think I want is a 'clone into':

    % cd <path to the local copy of my GitHub repo>
    % git clone <URL to package A @ tag S> <package A subdirectory>
    % git commit -m "Imported package A @ tag S" <package A subdirectory>
    % git clone <URL to package B @ tag T> <package B subdirectory>
    % git commit -m "Imported package B @ tag T" <package B subdirectory>
    % git push

Some time later, when Package A or Package B is updated to a new release
tag, I'd like to be able to choose (but not automatically) to merge those
changes in with my own changes and then update my GitHub repository.

Perhaps 'submodules' are what I am looking for?

Anyone have a good recipe or good hygiene/best practice recommendations for
this?

Best,

Grant Erickson

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-09-27 15:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-21  1:22 GIT and Cloning Remote Repositories into "Local Remote" Repositories Grant Erickson
2010-09-21  1:37 ` Casey Dahlin
2010-09-27  1:17   ` Grant Erickson
2010-09-27 15:18     ` Casey Dahlin
2010-09-27 15:29       ` Grant Erickson
2010-09-21  4:26 ` Tay Ray Chuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).