git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* workflow question
@ 2007-07-24 13:53 Patrick Doyle
  2007-07-24 15:37 ` Alex Riesen
  0 siblings, 1 reply; 25+ messages in thread
From: Patrick Doyle @ 2007-07-24 13:53 UTC (permalink / raw)
  To: git

I'm still trying to figure out how to adapt my workflow to git or git
to my workflow, and I've come up with yet another question or two...

I tend to work detached from our central SVN server, and I'm attracted
to the fact that I can work on my laptop, commit changes as I go
along, and later synchronize them back to the server.

On my current project, I am sole developer (at present) and the
central SVN server serves primarly as an off-site backup and
historical archive.

Enough of the setup, here are the questions...

1) I would like to make a (git) branch on which I can commit
hourly/daily/periodically as I add in a new feature (so that I can
roll back to the "Gee, I thought it was behaving yesterday -- what
does that code look like?" commit when I need to), but I don't want to
send all of the "commit as of 12:32 on Thursday" commits back to the
SVN server when I'm done.  Do I want to use a "squash" merge to merge
my changes back to the master branch before I synchronize with the
subversion server?  Or do I use the "--no-commit" option to merge?  Or
do I try something else?  The first/last time I tried this, I ended up
with a fast-forward merge back into master, which included all of my
stupid little commit messages.  I would rather one commit message that
read "Added XYZ feature".

2) When I don't fork a branch, and I don't commit until I've completed
the particular feature I'm working on, I can get a fairly good idea of
where I am and what I was doing last (which might be 5-7 days ago,
given high priority interrupts on other projects, summer vacations,
etc...) just by running a "git status".  I see that there are 7 new
files, and 2 modified files.  I know that, when I fork my branch, I
can use "git diff master" to see what's different between my branch
and the master, but then I get the diff of all of the changes as well,
which is too much information.  "git diff --name-only" and "git diff
--summary" are closer, but I can't tell what's been added vs. what's
been changed.  Any suggestions?

As an aside, is there an undocumented option to "git status" to
produce a less verbose report of what's been changed and what's not
checked in?  Perhaps a single line per file with a one or two letter
indication of the status of the file followed by the name?  If not,
would there be any violent objections to my submitting a patch to add
such a feature?

That's enough for now.  Thanks for reading this far :-)

--wpd

^ permalink raw reply	[flat|nested] 25+ messages in thread
* Workflow question
@ 2007-09-25 16:43 Russ Brown
  2007-09-25 19:09 ` Andreas Ericsson
  0 siblings, 1 reply; 25+ messages in thread
From: Russ Brown @ 2007-09-25 16:43 UTC (permalink / raw)
  To: git

Hi,

I've been trying to think of a git workflow that we could use to replace
our current svn/svk setup without simply using git in exactly the same
way that we use svn/svk.

Basically, we develop, maintain and enhance a website. On the central
repo is trunk which represents live, and any number of project branches.
Developers don't use local branches: they check out the project branches
they're working on and commit to those. Developers merge from trunk to
project branch from time to time to keep them current, and when a
project rolls out the branch is merged to trunk.

In addition to the obvious advantages that git would give us (such as
properly tracking that code author as opposed to the person who did the
merge), I'm wanting to gain the following benefits:

 * The repository is very large (multiple gigabytes) and mirroring using
svk obviously takes a lot of time and space, so I'm keen to bring that
down, most likely by the developer not needing to mirror branches he
doesn't care about, or by being able to throw away branches he's done with.
 * The repository is full of revisions that fail review (or break
things) and are fixed by subsequent revisions. We'd much rather be able
to have the developer fix his revisions before they get committed
'upstream' (whatever that ends up meaning).

I asked earlier about the email-based model that git itself uses, and
while it appears to work very well for a widely-dispersed open-source
project, I think it will be too cumbersome and slow for a fast-paced
internal development team who make a number of live releases every day.

So, I've been thinking and have come up with this, which I'd appreciate
comments about:

 1. On a server we stick a git repository which contains the master
branch, which represents what trunk did (i.e. the live platform). This
branch contains the full history for the live platform.
 2. On the same server we clone that repo to create a second repository
which is the developer area. In this we track master from the live repo,
and also create project branches.
 3. Developers clone this developer repo, but I'd like them to be able
to decide which branches they actually want to clone from that
repository rather than simply cloning them all. Is this possible?
 4. Developers create a local branch of the project they
are working on and commit to that.
 5. Once they think they're done, they publish their branch to the
development repo and request for comments.
 6. If all is not well, the developer creates a new local branch and
moves good revisions from his previous one to the new one, modifying
things as he goes, and republishes his new branch.
 7. If all is well, their works gets merged or rebased onto the main
project branch, and once that's ready it gets pushed to the master and
rolled to live. The developer's individual branches get deleted from the
dev repo since they're no longer required.
 8. From time to time the master branch gets merged to the project
branches. Developer's local branches can be rebased against the project
branch as they please.

Firstly, is all of this possible, and if so would it be considered a
good way of going about it?

Any comments appreciated.

-- 

Russ

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2007-09-26 12:42 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-24 13:53 workflow question Patrick Doyle
2007-07-24 15:37 ` Alex Riesen
2007-07-24 16:30   ` Patrick Doyle
2007-07-24 16:35     ` Julian Phillips
2007-07-24 20:54       ` Alex Riesen
2007-07-24 20:57     ` Alex Riesen
2007-07-24 21:00       ` J. Bruce Fields
2007-07-24 21:38         ` Linus Torvalds
  -- strict thread matches above, loose matches on Subject: below --
2007-09-25 16:43 Workflow question Russ Brown
2007-09-25 19:09 ` Andreas Ericsson
2007-09-25 19:34   ` Jeff King
2007-09-25 19:50     ` Wincent Colaiuta
2007-09-25 20:20       ` Jeff King
2007-09-25 20:37         ` Wincent Colaiuta
2007-09-25 19:42   ` Russ Brown
2007-09-25 20:17     ` Jeff King
2007-09-25 20:56       ` Russ Brown
2007-09-25 21:28         ` Junio C Hamano
2007-09-26  0:01           ` Russ Brown
2007-09-26  0:47         ` Jeff King
2007-09-26  1:51           ` Karl Hasselström
2007-09-26  2:55           ` Russ Brown
2007-09-26  5:29             ` Junio C Hamano
2007-09-26 12:42             ` Jeff King
2007-09-25 22:38     ` Andreas Ericsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).