{"thread":{"id":"9202","subject":"workflow question","startedAt":"2007-07-24T13:53:30Z","lastAt":"2007-07-24T21:38:50Z","messageCount":8,"participants":["Patrick Doyle","Alex Riesen","Julian Phillips","J. Bruce Fields","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"48468","messageId":"e2a1d0aa0707240653x55dd82b3pf9e3986f5c3bb344@mail.gmail.com","threadId":"9202","inReplyTo":null,"subject":"workflow question","fromName":"Patrick Doyle","fromEmail":"wpdster@gmail.com","sentAt":"2007-07-24T13:53:30Z","receivedAt":"2007-07-24T13:53:30Z","isPatch":false,"sender":{"key":"wpdster@gmail.com","avatar":null},"body":"I'm still trying to figure out how to adapt my workflow to git or git\nto my workflow, and I've come up with yet another question or two...\n\nI tend to work detached from our central SVN server, and I'm attracted\nto the fact that I can work on my laptop, commit changes as I go\nalong, and later synchronize them back to the server.\n\nOn my current project, I am sole developer (at present) and the\ncentral SVN server serves primarly as an off-site backup and\nhistorical archive.\n\nEnough of the setup, here are the questions...\n\n1) I would like to make a (git) branch on which I can commit\nhourly/daily/periodically as I add in a new feature (so that I can\nroll back to the \"Gee, I thought it was behaving yesterday -- what\ndoes that code look like?\" commit when I need to), but I don't want to\nsend all of the \"commit as of 12:32 on Thursday\" commits back to the\nSVN server when I'm done.  Do I want to use a \"squash\" merge to merge\nmy changes back to the master branch before I synchronize with the\nsubversion server?  Or do I use the \"--no-commit\" option to merge?  Or\ndo I try something else?  The first/last time I tried this, I ended up\nwith a fast-forward merge back into master, which included all of my\nstupid little commit messages.  I would rather one commit message that\nread \"Added XYZ feature\".\n\n2) When I don't fork a branch, and I don't commit until I've completed\nthe particular feature I'm working on, I can get a fairly good idea of\nwhere I am and what I was doing last (which might be 5-7 days ago,\ngiven high priority interrupts on other projects, summer vacations,\netc...) just by running a \"git status\".  I see that there are 7 new\nfiles, and 2 modified files.  I know that, when I fork my branch, I\ncan use \"git diff master\" to see what's different between my branch\nand the master, but then I get the diff of all of the changes as well,\nwhich is too much information.  \"git diff --name-only\" and \"git diff\n--summary\" are closer, but I can't tell what's been added vs. what's\nbeen changed.  Any suggestions?\n\nAs an aside, is there an undocumented option to \"git status\" to\nproduce a less verbose report of what's been changed and what's not\nchecked in?  Perhaps a single line per file with a one or two letter\nindication of the status of the file followed by the name?  If not,\nwould there be any violent objections to my submitting a patch to add\nsuch a feature?\n\nThat's enough for now.  Thanks for reading this far :-)\n\n--wpd\n"},{"id":"48482","messageId":"81b0412b0707240837l16844dbct52ffa426d8b8547b@mail.gmail.com","threadId":"9202","inReplyTo":"e2a1d0aa0707240653x55dd82b3pf9e3986f5c3bb344@mail.gmail.com","subject":"Re: workflow question","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-07-24T15:37:43Z","receivedAt":"2007-07-24T15:37:43Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On 7/24/07, Patrick Doyle <wpdster@gmail.com> wrote:\n> 2) When I don't fork a branch,\n\nthis is a confusing sentence: \"fork\" does not happen as\nan explicit operation (if at all). You just commit somewhere\nand depending on how you look at the history you either\nsee or not see a \"fork\".\n\n> ... and I don't commit until I've completed\n> the particular feature I'm working on, I can get a fairly good idea of\n> where I am and what I was doing last (which might be 5-7 days ago,\n> given high priority interrupts on other projects, summer vacations,\n> etc...) just by running a \"git status\".  I see that there are 7 new\n> files, and 2 modified files.  I know that, when I fork my branch, I\n> can use \"git diff master\" to see what's different between my branch\n> and the master, but then I get the diff of all of the changes as well,\n> which is too much information.  \"git diff --name-only\" and \"git diff\n> --summary\" are closer, but I can't tell what's been added vs. what's\n> been changed.  Any suggestions?\n\n\"git log -p ..master\", or even simpler \"gitk ..master\"\n\n> As an aside, is there an undocumented option to \"git status\" to\n> produce a less verbose report of what's been changed and what's not\n> checked in?  Perhaps a single line per file with a one or two letter\n> indication of the status of the file followed by the name?  If not,\n> would there be any violent objections to my submitting a patch to add\n> such a feature?\n\nmy_status() {\n  git diff --cached --name-status -r -M -C HEAD -- \"$@\" && \\\n  git diff --name-status -r -M -C -- \"$@\"\n}\n\nUse as: my_status [pathname-limiter].\nDoes not show untracked files, though.\n"},{"id":"48483","messageId":"e2a1d0aa0707240930gb99cb0csd1ce9946d33982d@mail.gmail.com","threadId":"9202","inReplyTo":"81b0412b0707240837l16844dbct52ffa426d8b8547b@mail.gmail.com","subject":"Re: workflow question","fromName":"Patrick Doyle","fromEmail":"wpdster@gmail.com","sentAt":"2007-07-24T16:30:12Z","receivedAt":"2007-07-24T16:30:12Z","isPatch":false,"sender":{"key":"wpdster@gmail.com","avatar":null},"body":"On 7/24/07, Alex Riesen <raa.lkml@gmail.com> wrote:\n> On 7/24/07, Patrick Doyle <wpdster@gmail.com> wrote:\n> > 2) When I don't fork a branch,\n>\n> this is a confusing sentence: \"fork\" does not happen as\n> an explicit operation (if at all). You just commit somewhere\n> and depending on how you look at the history you either\n> see or not see a \"fork\".\nok, I probably should have said, \"When I don't create a branch, and\nwhen I have not yet committed any changes for the particular\nfeature...\"\n\n>\n> > ... and I don't commit until I've completed\n> > the particular feature I'm working on, I can get a fairly good idea of\n> > where I am and what I was doing last (which might be 5-7 days ago,\n> > given high priority interrupts on other projects, summer vacations,\n> > etc...) just by running a \"git status\".  I see that there are 7 new\n> > files, and 2 modified files.  I know that, when I fork my branch, I\n> > can use \"git diff master\" to see what's different between my branch\n> > and the master, but then I get the diff of all of the changes as well,\n> > which is too much information.  \"git diff --name-only\" and \"git diff\n> > --summary\" are closer, but I can't tell what's been added vs. what's\n> > been changed.  Any suggestions?\n>\n> \"git log -p ..master\", or even simpler \"gitk ..master\"\nI was hoping for something less verbose than a diff or a patch file --\nsomething that just listed what has changed -- I'll have to\ninvestigate whether your \"my_status()\" macro provides the information\nfor which I was looking -- thanks for the pointer.\n\nAnd, as for gitk, there is something about the combination of the\nscreen on my laptop, my Linux installation (FC6), my X server\nconfiguration, and/or me that makes the fonts totally unreadable.  I\nkeep meaning to follow up on that, but I'm stuck in a\nchicken-and-the-egg situation.  I don't see the utility of gitk\nbecause I can't read the display that it produces.  I don't look for\nthe time to fix the display that it produces because, thus far, I\ndon't see the utility of gitk.  Sigh...\n\n\n> my_status() {\n>   git diff --cached --name-status -r -M -C HEAD -- \"$@\" && \\\n>   git diff --name-status -r -M -C -- \"$@\"\n> }\n>\n> Use as: my_status [pathname-limiter].\n> Does not show untracked files, though.\n>\nAhhh... I was looking around git-status instead of git-diff.  That\nmakes sense now that you mention it.  Someday I may have the intuitive\nunderstanding of git that would point me in that direction myself, but\nI ain't there yet :-)\n\nThanks.\n\n--wpd\n"},{"id":"48484","messageId":"Pine.LNX.4.64.0707241733370.29908@reaper.quantumfyre.co.uk","threadId":"9202","inReplyTo":"e2a1d0aa0707240930gb99cb0csd1ce9946d33982d@mail.gmail.com","subject":"Re: workflow question","fromName":"Julian Phillips","fromEmail":"julian@quantumfyre.co.uk","sentAt":"2007-07-24T16:35:15Z","receivedAt":"2007-07-24T16:35:15Z","isPatch":false,"sender":{"key":"julian@quantumfyre.co.uk","avatar":"https://avatars.githubusercontent.com/u/948888?v=4"},"body":"On Tue, 24 Jul 2007, Patrick Doyle wrote:\n\n>> >  ... and I don't commit until I've completed\n>> >  the particular feature I'm working on, I can get a fairly good idea of\n>> >  where I am and what I was doing last (which might be 5-7 days ago,\n>> >  given high priority interrupts on other projects, summer vacations,\n>> >  etc...) just by running a \"git status\".  I see that there are 7 new\n>> >  files, and 2 modified files.  I know that, when I fork my branch, I\n>> >  can use \"git diff master\" to see what's different between my branch\n>> >  and the master, but then I get the diff of all of the changes as well,\n>> >  which is too much information.  \"git diff --name-only\" and \"git diff\n>> >  --summary\" are closer, but I can't tell what's been added vs. what's\n>> >  been changed.  Any suggestions?\n>>\n>>  \"git log -p ..master\", or even simpler \"gitk ..master\"\n> I was hoping for something less verbose than a diff or a patch file --\n> something that just listed what has changed -- I'll have to\n> investigate whether your \"my_status()\" macro provides the information\n> for which I was looking -- thanks for the pointer.\n\n\"git log --stat ..master\" perhaps?\n\n-- \nJulian\n\n  ---\nThe future isn't what it used to be.  (It never was.)\n"},{"id":"48515","messageId":"20070724205457.GC6004@steel.home","threadId":"9202","inReplyTo":"Pine.LNX.4.64.0707241733370.29908@reaper.quantumfyre.co.uk","subject":"Re: workflow question","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-07-24T20:54:57Z","receivedAt":"2007-07-24T20:54:57Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Julian Phillips, Tue, Jul 24, 2007 18:35:15 +0200:\n> On Tue, 24 Jul 2007, Patrick Doyle wrote:\n> \n> >>>  ... and I don't commit until I've completed\n> >>>  the particular feature I'm working on, I can get a fairly good idea of\n> >>>  where I am and what I was doing last (which might be 5-7 days ago,\n> >>>  given high priority interrupts on other projects, summer vacations,\n> >>>  etc...) just by running a \"git status\".  I see that there are 7 new\n> >>>  files, and 2 modified files.  I know that, when I fork my branch, I\n> >>>  can use \"git diff master\" to see what's different between my branch\n> >>>  and the master, but then I get the diff of all of the changes as well,\n> >>>  which is too much information.  \"git diff --name-only\" and \"git diff\n> >>>  --summary\" are closer, but I can't tell what's been added vs. what's\n> >>>  been changed.  Any suggestions?\n> >>\n> >> \"git log -p ..master\", or even simpler \"gitk ..master\"\n> >I was hoping for something less verbose than a diff or a patch file --\n> >something that just listed what has changed -- I'll have to\n> >investigate whether your \"my_status()\" macro provides the information\n> >for which I was looking -- thanks for the pointer.\n> \n> \"git log --stat ..master\" perhaps?\n> \n\nyep. Or just use the same options as with diff:\n\n    $ git log -r --name-status -M -C ..master\n"},{"id":"48516","messageId":"20070724205702.GD6004@steel.home","threadId":"9202","inReplyTo":"e2a1d0aa0707240930gb99cb0csd1ce9946d33982d@mail.gmail.com","subject":"Re: workflow question","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-07-24T20:57:02Z","receivedAt":"2007-07-24T20:57:02Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Patrick Doyle, Tue, Jul 24, 2007 18:30:12 +0200:\n> And, as for gitk, there is something about the combination of the\n> screen on my laptop, my Linux installation (FC6), my X server\n> configuration, and/or me that makes the fonts totally unreadable.  I\n> keep meaning to follow up on that, but I'm stuck in a\n> chicken-and-the-egg situation.  I don't see the utility of gitk\n> because I can't read the display that it produces.  I don't look for\n> the time to fix the display that it produces because, thus far, I\n> don't see the utility of gitk.  Sigh...\n\nThat's a real pity, because it is very powerful.\n\nTry removing ~/.gitk, or look into it and try changing the font.\nHere is mine, for reference:\n\nset mainfont {Helvetica 11}\nset textfont {Courier 11}\nset uifont {Helvetica 9 bold}\nset tabstop 8\nset findmergefiles 0\nset maxgraphpct 50\nset maxwidth 16\nset cmitmode patch\nset wrapcomment none\nset showneartags 1\nset showlocalchanges 1\nset bgcolor white\nset fgcolor black\nset colors {green red blue magenta darkgrey brown orange}\nset diffcolors {red \"#00a000\" blue}\nset selectbgcolor gray85\nset geometry(main) 1005x850+1417+41\nset geometry(topwidth) 1001\nset geometry(topheight) 458\nset geometry(pwsash0) \"684 2\"\nset geometry(pwsash1) \"878 2\"\nset geometry(botwidth) 725\nset geometry(botheight) 372\nset permviews {}\n"},{"id":"48517","messageId":"20070724210024.GC5040@fieldses.org","threadId":"9202","inReplyTo":"20070724205702.GD6004@steel.home","subject":"Re: workflow question","fromName":"J. Bruce Fields","fromEmail":"bfields@fieldses.org","sentAt":"2007-07-24T21:00:24Z","receivedAt":"2007-07-24T21:00:24Z","isPatch":false,"sender":{"key":"bfields@citi.umich.edu","avatar":null},"body":"On Tue, Jul 24, 2007 at 10:57:02PM +0200, Alex Riesen wrote:\n> Patrick Doyle, Tue, Jul 24, 2007 18:30:12 +0200:\n> > And, as for gitk, there is something about the combination of the\n> > screen on my laptop, my Linux installation (FC6), my X server\n> > configuration, and/or me that makes the fonts totally unreadable.  I\n> > keep meaning to follow up on that, but I'm stuck in a\n> > chicken-and-the-egg situation.  I don't see the utility of gitk\n> > because I can't read the display that it produces.  I don't look for\n> > the time to fix the display that it produces because, thus far, I\n> > don't see the utility of gitk.  Sigh...\n> \n> That's a real pity, because it is very powerful.\n> \n> Try removing ~/.gitk, or look into it and try changing the font.\n\n(Also, as a quick fix, note that ctrl-- and ctrl-= will adjust the font\nsize down or up (respectively).)\n\n--b.\n"},{"id":"48522","messageId":"alpine.LFD.0.999.0707241433360.3607@woody.linux-foundation.org","threadId":"9202","inReplyTo":"20070724210024.GC5040@fieldses.org","subject":"Re: workflow question","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-07-24T21:38:50Z","receivedAt":"2007-07-24T21:38:50Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Tue, 24 Jul 2007, J. Bruce Fields wrote:\n> \n> (Also, as a quick fix, note that ctrl-- and ctrl-= will adjust the font\n> size down or up (respectively).)\n\nSide note: this can be *really* confusing on non-US keyboards.\n\nThe \"=\" makes sense on a US keyboard, because it's really \"ctrl-+\" without \nthe added need to press \"shift\".\n\nOn many non-US keyboards, there is no such arrangement of +/= on the \nkeyboard.\n\nSo on a Finnish keyboard, for example, the sequence to make the fonts \nsmaller is \"ctrl--\", but the sequence to make them larger is \n\"contr-shift-0\". Which makes *no* sense what-so-ever, but the \"=\" sign is \n\"shift-0\".\n\nOh, well. On a Finnish keyboard, \"ctrl-+\" would make tons of sense. I \nalways try it, and am frustrated when it doesn't work.\n\n\t\t\tLinus\n"}]}