Hi Anatoly,
  Hopefully I've understood your questions...

  So each time you do a commit on your branch those become 
revisions/versions in your local repository. If you're not committing 
changes as you go then your local repository isn't changed. When you merge 
your branch back into trunk it depends on how "clean" you want your 
history. There are a couple of things you can do to ensure that all your 
interim commits on your branch do not appear in the trunk history, 
specifically *interactive rebasing* and/or enable -*-no-ff* on merges.

I won't go into all the details here as there are plenty of good resources 
where people have covered this far better than I could. One great resource 
is this - http://rypress.com/tutorials/git/index.html

If I were you I'd go through the full guide but the sections that might 
answer your questions are:

Rebasing - http://rypress.com/tutorials/git/rebasing.html  
Rewriting History - http://rypress.com/tutorials/git/rewriting-history.html

Another great set of tips, best practice, guides can be found here - 


On Thursday, 31 January 2013 08:49:08 UTC, Anatoly Krasner wrote:
> I want to use Git to manage a C++ project. I have a branch in which I 
> develop a specific class, and I have several version of its header and 
> source files. Each such version is slightly different and I work with them 
> together. For example, one of the files is a header file with all methods 
> commented, and I remove the // from lines as I work. Another one is a 
> version of my class, which is a class template. It's like a sandbox where I 
> try things while it develop that class. So I have 2 questions:
> Do all these versions belong to the Git repository, including the one with 
> comments I mark? Or it's a document which should be in my project's 
> document folder, outside the repo?
> And if I do have all versions in the repo, how do I make sure that when I 
> merge the branch with the trunk, only the "real" class files are merged and 
> all my sandbox templates are not added to the trunk? Will merging 
> automatically add them all to the trunk? And in general, if I check out, 
> delete a file and commit - will the file be considered "deleted" from the 
> new revision, or it just stays there from the previous revision?

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to