GIT and Cloning Remote Repositories into "Local Remote" Repositories

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]