NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
thoughts on git (Score:1)
I've looked at switching/using git at least twice in the last six months or so. Lately, it seems that native Win32 support is improving so that hurdle I had is dropping.
I get most of it, conceptually, but I find some parts of the application of it confusing. It desperately needs more cookbooks, more examples of "here's how I work with it day to day" and not just by Linux kernel developers who are (a) highly-technical already and (b) managing a vast, decentralized project with their own particular legacy
Re: (Score:1)
The “
-a” switch is because git has an indirection between the working copy and the repository: the index, ie. a commit-ready snapshot of the tree. You don’t commit the state of the working copy directly; you copy things from the working copy to the index (this is called staging), and then commit the index. If you make a change in the working copy but you do not stage it, a plain commit will not contain the change from the working copy. Explicit staging is done usinggit-add.The “
-aRe: (Score:1)
I think I'd be more interested in hearing you (or other git users) expound on whether the -a is a good or bad th
rjbs
Re:thoughts on git (Score:1)
Sorry, but now it’s you making assumptions. When someone who has only ever seen tutorials asks “why the
-a,” I cannot presume that they know git makes a distinction between the working copy and what gets committed. So I can’t talk about its value before laying out the facts, which resulted in two paragraphs of expository prelude.And indeed, judging by David’s reply, he appreciated the tack I took to answering his question. So with all due respect for Schwern, I think I made the right decision.
I don’t know that I can make such a judgment call. Is it good? Is it bad? All I can say is: it is. And maybe: it’s different. Whether it gives you anything worthwhile depends on your particular psychology, much like your choice of text editor, say. What it is is an extra freedom to decide what history will look like. I appreciate greatly, particularly after coming from Subversion, where history tends to be Set In Stone, a fact that always chafed me.
But if you’re less particular than me about what’s in your commits, then that level of control may well feel superfluous or even burdensome to you, and you may be best served by your alias.
It’s there if you like it and you can opt out if not.
Reply to This
Parent
Re: (Score:1)
rjbs
Re: (Score:1)
Hmm. Honestly, I’m not trying to be ornery, I just can’t give a straight good/bad answer. It’s highly dependent on workflows.
In my case, I do “
foo status” quite frequently, and always when I’m poised to “foo commit.”When
fooisgit, thegit-statusis an opportunity togit-addthe files I think I’m done editing during for this particular set of changes. Sometimes while I continue in other files, I go back and make further changes in files I’ve aRe: (Score:1)
I think the (in my experience) underhyped command that I need to use more often for having multiple sets of things changing is git-stash. I should try to use it more.
rjbs
Re: (Score:2)
- ask
-- ask bjoern hansen [askbjoernhansen.com], !try; do();
Re: (Score:2)
I just learned all this today, so take it with a grain of salt, but to me having -a exist and that feature not be the default is exactly how I want to work. I have my working copy, with tons of changes I want to keep around but ignore for the moment, and then I want to go through 25 changed files and build up a list of changes to commit. Then I don't want to botch it all by typing "cvs commit -m'commit message' [oops I forgot to list my files!]" . As a total git newbie, I think this is great design, at l
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers