From: Dmitry Potapov <dpotapov@gmail.com>
To: George Dennie <gdennie@pospeople.com>
Cc: "'Jan Krüger'" <jk@jk.gs>, git@vger.kernel.org
Subject: Re: Hey - A Conceptual Simplication....
Date: Fri, 20 Nov 2009 04:35:46 +0300 [thread overview]
Message-ID: <20091120013545.GA22556@dpotapov.dyndns.org> (raw)
In-Reply-To: <008401ca6880$33d7e550$9b87aff0$@com>
On Wed, Nov 18, 2009 at 01:51:56PM -0500, George Dennie wrote:
>
> One of the concerns I have with the manual pick-n-commit is that you can
> forget a file or two.
It is more difficult to make this mistake with Git than many others
VCSes, because Git shows the list of files that are changed but not
committed as well as the list of untracked files when you try to commit
something. So, it has never been a real issue for me in practice...
> Consequently, unless you do a clean checkout and test
> of the commit, you don't know that your publishable version even compiles.
If you want to be sure that clean checkout will be compiled, the only
way to guarantee that is to do a clean checkout. Even if you commit all
files except those that are specified in .gitignore, it is not enough to
be sure that a clean checkout will be compiled... But in most cases, you
do not need to do that to be *reasonable* sure that a clean checkout
will be compiled later, and if you have any doubts, you can do a clean
checkout and testing _after_ committing your changes. There is no reason
to be afraid to commit something that may not work if you can amend that
later (until you publish your changes).
> It seems safer to commit the entirety of your work in its working state and
> then do a clean checkout from a dedicated publishable branch and manually
> merge the changes in that, test, and commit.
Maybe I did not understand your words, but I am not sure what is gained
in this way... Clearly there is no reason to publish a work that you
have not tested yet. And no one cares about crap that you keep in your
working tree either... So, a better approach is to commit your changes
as a series of patches that can be reviewed easily, then do all testing
and then publish them for integration with the main development branch.
>
> It seems the intuitive model is to treat version control as applying to the
> whole document, not parts of it. In this respect the document is defined by
> the IDE, namely the entire solution, warts and all.
This is a very bogus idea. If you want to preserve all warts etc, you
just do backup of the whole disk and now you have a state that can be
compiled any time later (provided that your hardware do not change too
much). In my experience, in most cases when I was not able to compile
an old version were caused not by forgetting to commit something, but
changing in the environment (like new compiler, new libraries, etc).
But when your commits are fine-grained, you can always cherry-pick the
corresponding fix-up and compile this old version if it is necessary.
In my experience, the value of VCS history is the ability to look at it
(sometimes many years later) and understand who wrote this line and why.
Also, nearly all cases when I had to compile some old version were due
to bisecting some tricky bug. In both cases, having fine-grained commits
was crucial to success.
> When you start
> selectively saving parts of the document then you are doing two things,
> versioning and publishing; and at the same time.
No, you don't. Committing some changes and publishing them are two
separated operations in Git, and that it is pretty much fundamental.
Normally, you commit changes in a few separated patches, review them to
make sure that changes match commit messages, do all testing, and only
then you publish them.
Dmitry
next prev parent reply other threads:[~2009-11-20 1:36 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-18 12:55 Hey - A Conceptual Simplication George Dennie
2009-11-18 13:18 ` Jonathan del Strother
2009-11-18 13:25 ` Jan Krüger
2009-11-18 18:51 ` George Dennie
2009-11-18 19:40 ` Jakub Narebski
2009-11-18 19:52 ` Jason Sewall
2009-11-19 2:03 ` George Dennie
2009-11-19 7:42 ` Björn Steinbrink
2009-11-19 20:12 ` George Dennie
2009-11-19 21:27 ` Junio C Hamano
2009-11-20 0:49 ` Jakub Narebski
2009-11-20 6:27 ` Junio C Hamano
2009-11-20 2:31 ` Dmitry Potapov
2009-11-19 10:27 ` Jakub Narebski
2009-11-20 1:48 ` Dmitry Potapov
2009-11-20 1:55 ` david
2009-11-20 2:56 ` Dmitry Potapov
2009-11-20 2:35 ` Björn Steinbrink
2009-11-20 3:08 ` Dmitry Potapov
2009-11-20 1:35 ` Dmitry Potapov [this message]
2009-11-20 6:33 ` Junio C Hamano
2009-11-20 15:07 ` Dmitry Potapov
2009-11-18 13:30 ` Thomas Rast
2009-11-18 13:31 ` Jason Sewall
2009-11-18 20:36 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091120013545.GA22556@dpotapov.dyndns.org \
--to=dpotapov@gmail.com \
--cc=gdennie@pospeople.com \
--cc=git@vger.kernel.org \
--cc=jk@jk.gs \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).