This just occurred to me. I am running on Linux. I use "make" to do my 
compiles. Which I do in the working directory. I don't want the results of 
the compiles to be tracked in git. What I have done in the past is to have 
a clean directory when I did the "git commit", often with a "make clean" 
command. Also I have tried to put the generated file names into my 
.gitignore file. But what has occurred to me is to use branching. Maintain 
my source while I am in the "master" branch. Just before I do a "make", do 
"git checkout -b test" to switch to the "test" branch, creating it if 
necessary. Once I am finished testing, I do a "git checkout master" and git 
will "clean up" my working directory for me. I would never do a "git 
commit" while in the "test" branch. And I would periodically do a "git 
branch -D test" to totally clean up the "test" branch. Is this reasonable? 
Or just plain foolish?



Reply via email to