[tei-council] git help

Hugh Cayless philomousos at gmail.com
Tue Aug 12 08:13:24 EDT 2014


The answer(s) depend a bit on whether you've been doing commits on the repo
on your laptop. If so, you won't be able to push to github until you've
merged any changes it has since you last updated. There are a couple of
ways you can go here, depending on the size/significance of your changes:

1) just do a git pull from github and Sebastian's changes will be merged
into your repo. If there were any conflicts, you'd have to resolve them,
but it doesn't sound like there should be. Then push back to github. If
your changes so far are smallish and unlikely to break anything for others,
this would be ok. You could then just pull from github onto your desktop.

2) (if you don't want to sync everything via github). Still pull to merge
the remote changes, but then just copy your repo over to the desktop (the
whole thing). If you haven't been committing as you go, you could just copy
the affected files. You can also add the desktop repo as a remote and push
to it if you want (depends how convenient access from one to the other is).

3) (if your changes are of the big, breaky type, of even if you just want
to). Branch. You can even retroactively branch if you've already committed
changes to your local master (see e.g.
http://stackoverflow.com/questions/364925/is-it-possible-to-retroactively-turn-a-set-of-commits-into-a-branch,
which is more complex than what you probably want). Then you just work in
your branch until you're ready to merge it back into master. You can always
pull updates to master and merge them into your branch as you go (usually a
good idea). You can push the new branch to github and pull it down on your
desktop, and everything will be fine. Branching in Git is cheap (very much
unlike Subversion).

I generally do something like #3 for anything other than minor incremental
changes if I'm pushing to a public repo.

Hope that helps. Happy to follow up with more detail if needed.

Hugh


On Sat, Aug 9, 2014 at 8:48 AM, Syd Bauman <
syd at paramedic.wwp.northeastern.edu> wrote:

> I started this as a message to Hugh, but then figured that others may
> benefit from his (or someone else's) response.
>
> I am working on making some changes to the stylesheets that have
> taken several days so far, and will take several more, probably. In
> the meantime, someone else (probably Sebastian) has also made
> non-conflicting changes to the same file.
>
> I presume that `git` would handle this in roughly the same way `svn`
> does -- when I try to push my changes to GIThub either they will be
> automagically folded in, or I will have to make manual adjustments
> before the push will succeed. (Is that right?)
>
> But more importantly, I had been making these changes on my little
> laptop. Now I want to work on them from my big desktop. (Why? Little
> laptop takes a long time to run a P5 build!)
>
> I could push my changes from the little laptop into GIThub, and then
> pull them onto the big desktop. But that would leave the stylesheets
> y'all use from GIThub badly broken.
>
> I could just copy the one file that matters from little laptop to big
> desktop, but a) that seems like a cop-out, and b) the copy on big
> desktop already has the changes someone else (probably Sebastian) has
> also made to this file, so I would lose those -- wouldn't that
> confuse the BLEEP out of `git`?
>
> SO, my question ... Is there a "git-proper" way of propagating my
> changes from my little laptop to my big desktop *without* pushing my
> changes into GIThub yet?
>
> I'm guessing there is, since this sort of thing is supposedly exactly
> what makes `git` better than `svn`. After all, both little laptop and
> big desktop have complete repositories. But one or both them will
> have to be running a git server or a web server (or both), right?
>
> Thanks for any thoughts on this.
> --
> tei-council mailing list
> tei-council at lists.village.Virginia.EDU
> http://lists.village.Virginia.EDU/mailman/listinfo/tei-council
>
> PLEASE NOTE: postings to this list are publicly archived
>


More information about the tei-council mailing list