So, if I understand this correctly, all my merges between the OpenNMS repo and my code, are done from my local workstation.
And then "push" those changes to my repo that you called internal-opennms on my "work-server". So, if I have another workstation, a git clone from my internal-opennms work-server will get all the "company" changes, but they would have to "git remote add opennms <url-to-opennms-repo>" on *their* local workstation in order to pull changes and merge. Is this correct? On Tue, Jun 8, 2010 at 11:32 PM, Aaron Paxson <aaron.pax...@gmail.com> wrote: > B-E-A-utiful! > > I'll start on this tomorrow! > > --Aaron > > > On Tue, Jun 8, 2010 at 12:52 AM, Benjamin Reed <ran...@opennms.org> wrote: >> On 6/7/10 7:50 PM, Aaron Paxson wrote: >>> All, >>> >>> I've tried to figure this out on my own, and, from time to time, ask >>> in IRC, but I'm just not *gitting* it, if you pardon the pun. >>> >>> I want to maintain my own GIT repository in my company. That is, >>> maintain a bare repo that all my systems can "pull" from and "push" to >>> with our custom code (mostly just custom events, agents, and ticketing >>> code). >>> >>> *BUT* - I still want to "pull" from the opennms git repo for updates, >>> both trunk and stable. >>> >>> Is this even doable in GiT? >>> >>> If so, can someone point me to a handy page, or point me in the right >>> direction? Does anyone else do this? >>> >>> Thanks, and can't wait for 1.8!! >>> >> Yup, as long as both clones are based on the same code, you can push and >> pull around however you want. I do this sometimes when I want to test >> on another one of my macs at home. What you want is to have multiple >> "remotes." A remote is just a git URL that data can be pulled from. By >> default, "git clone" creates a "remote" called origin. >> >> on your work server: >> git clone git://opennms.git.sourceforge.net/gitroot/opennms/opennms >> internal-opennms >> >> on your own machine: >> git clone ssh://internal-machine/path/to/internal-opennms >> git remote add opennms >> git://opennms.git.sourceforge.net/gitroot/opennms/opennms >> >> ...if you run "git remote" then it should say: >> >> opennms >> origin >> >> "origin" is your internal-opennms one, the default, and "opennms" points >> to the upstream opennms repo. >> >> By default, your internal is only going to have master, but you can give >> it 1.8 as well by doing: >> >> git fetch opennms >> # create a 1.8 branch based on the "real" opennms 1.8 >> git checkout -b 1.8 opennms/1.8 >> # push to origin (internal) branch called 1.8 >> # if it doesn't exist, it's created >> git push origin 1.8 >> # converts your 1.8 branch to track origin/1.8 instead of opennms/1.8 >> for future pushes >> # run `git config -l` to see the current setting >> git config branch.1.8.remote origin >> >> Then your normal workflow would be: >> >> # work with internal opennms repo >> <edit files> >> git add <files> >> git commit -m 'my changes' >> git push origin >> >> # get updates from "real" opennms repo >> git fetch opennms >> git merge opennms/master >> git push origin master >> >> # get 1.8 updates >> git fetch opennms >> git merge opennms/1.8 >> # pushes to origin (internal) 1.8 branch, if you did the `git config` >> above >> # you could also specify it explicitly: git push origin 1.8 >> git push >> >> -- >> Benjamin Reed >> The OpenNMS Group >> http://www.opennms.org/ >> >> >> > > > > -- > Aaron J. Paxson > --------- > aaron.pax...@gmail.com > http://aaron.thepaxson5.org > -- Aaron J. Paxson --------- aaron.pax...@gmail.com http://aaron.thepaxson5.org ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Please read the OpenNMS Mailing List FAQ: http://www.opennms.org/index.php/Mailing_List_FAQ opennms-devel mailing list To *unsubscribe* or change your subscription options, see the bottom of this page: https://lists.sourceforge.net/lists/listinfo/opennms-devel