gusl: (Default)
[personal profile] gusl
I'm finally working with Git (thanks to [livejournal.com profile] hostilefork and folks on the IRC #git channel). I like the separation between 'commit' and 'push'. In the past, I've worked with CVS and SVN, which apparently don't make that distinction.
'commit' creates a checkpoint in your local machine, to which you can go back (and apparently tracks diffs). 'push' updates the server with the last committed version.

I've been using GitHub as my backup service, which means that I've been committing and pushing "dirty" code (unreadable, untested, etc)... which may become a problem. Will Git let me tag some versions as official?

(no subject)

Date: 2009-10-17 10:41 pm (UTC)
From: [identity profile] bhudson.livejournal.com
Assuming it's the same as mercurial, to tag a version all you have to do is make a branch.

(no subject)

Date: 2009-10-17 11:39 pm (UTC)
From: [identity profile] gustavolacerda.livejournal.com
That sounds like a wrong thing... afterall, I just want to mark it as official.

Btw, is 'branch' a local operation? Can you push things to the server, even if there's no new commit?

(no subject)

Date: 2009-10-17 11:47 pm (UTC)
From: [identity profile] lordspaz.livejournal.com
Why does branching seem like the wrong thing...? You want to maintain two different versions of the codebase - one official one, and one you develop on. Sounds like a branch to me. Also, branches are supposedly ridiculously cheap.

I'm sure you can push branches to a server.

(no subject)

Date: 2009-10-17 11:56 pm (UTC)
From: [identity profile] gustavolacerda.livejournal.com
ah, so you work on the 'working' branch, and occasionally clean it up and commit it as a new branch?

So your topology would look like this?
o---o---o---o---o---o---o---o---o---o---o
         \               \       \
          o               o       o

(no subject)

Date: 2009-10-18 02:03 am (UTC)
From: [identity profile] williamallthing.livejournal.com
You can tag things in git as well as branch. The distinction is very minor---both tags and branches are basically pointers into the commit DAG, and the only difference is that a branch automatically moves forward when you make a new commit.

Branching is a local operation, and you can push that to the server even if there's no commit. (You're just pushing the pointer.) Of course you'll have to figure out the magical git syntax to do that. I wrote a script called `git publish-branch` that you can search for.

(no subject)

Date: 2009-10-17 11:29 pm (UTC)
From: [identity profile] lordspaz.livejournal.com
I, too, am a fan of Git - I like having local commits. I haven't used GitHub; I've been using my desktop as my server. Has your experience with them been good? Are you only using their free service?

(no subject)

Date: 2009-10-17 11:35 pm (UTC)
From: [identity profile] gustavolacerda.livejournal.com
yeah, only the free service so far.
I haven't done very much yet, but it's been working ok.

February 2020

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags