Koha Git mini-tutorial: pulling from remote repostories

Earlier today Chris Cormack and I were chatting on IRC about various ways to manage patches, and decided to stage a little tutorial about how to pull from remote Git repositories:

<chris> speaking of public repo’s … i have been pushing to github for a while
<chris> but i have set up git-daemon on my machine at home too
<gmcharlt> chris: anything you’re ready to have me look at to pull?
<chris> not really
<chris> one interesting thing is the dbix_class branch
<chris> http://git.workbuffer.org/cgi-bin/gitweb.cgi?p=koha.git;a=summary
<gmcharlt> even if it’s trivial, it occurs to me that doing it and writing up how we did it might be useful material for a tutorial blog post or maiilings to koha-devel
<chris> lemme check
<chris> tell ya what
<chris> ill do a history.txt update
<chris> and commit that, and we can pull that
<chris> gmcharlt: http://git.workbuffer.org/cgi-bin/gitweb.cgi?p=koha.git;a=shortlog;h=refs/heads/documentation
<chris> so you can a remote for my repo
<chris> git remote add workbuffer.org git://git.workbuffer.org/git/koha.git
<chris> then git checkout -b documentation –track workbuffer.org/documentation
<chris> (probably need a git fetch workbuffer.org too(
<chris> then you can cherry-pick that commit over
<chris> thats one way to do it
<chris> or you could just checkout a branch
<gmcharlt> chris: yeah, I think I’ll do it as a pull
<chris> checkout -b mydocumentation
<chris> git pull workbuffer.org/documentation
<chris> i think that will do it anyway
<gmcharlt> yeah, then into my staging branch
<gmcharlt> git checkout test
<gmcharlt> git merge mydocumentation/documentation
<gmcharlt> or directly
<gmcharlt> git merge workbuffer.org/documentation
<chris> yep
<chris> i think the pull will do fetch + merge for ya
<gmcharlt> it does indeed
<gmcharlt> fetch first, though
<gmcharlt> lets you do git log –pretty=oneline test workbuffer.org/documentation
<chris> good point
<gmcharlt> chris: well, let’s make it official – send a pull request to the patches list
<chris> will do
<gmcharlt> e.g., Subject: PULL – git://git.workbuffer.org/koha.git – documentation – history changes
<gmcharlt> brief description of changes in body
<gmcharlt> something like that
<chris> works for me
<gmcharlt> “Welcome, all, to DVCS performance theatre”
<chris> off it goes
<chris> this was our first git tutorial right there .. quick someone take photos or something 🙂

CC BY-SA 4.0 Koha Git mini-tutorial: pulling from remote repostories by Galen Charlton is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

2 thoughts on “Koha Git mini-tutorial: pulling from remote repostories

  1. What I could have done was

    git request-pull origin/master git://git.workbuffer.org/git/koha.git | mailx patches@koha.org -s “Request to pull”

    And it would make a nicely formatted message for me

Comments are closed.