git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to manage parameter files and code separately using git?
@ 2010-05-01 12:57 Tilo Schwarz
  2010-05-01 17:18 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Tilo Schwarz @ 2010-05-01 12:57 UTC (permalink / raw)
  To: git

Hi all,

maybe someone has an idea how to do what I'd like to do using git:

I use git for "normal" c coding, i.e. having branches like master, test,  
foo, etc. Built are executables (Linux), which need parameter text files  
to work. What I did up to now was to check in the parameter files in the  
same way I check in the code: when I change a parameter file, I do a  
commit on it, this way I always have a history of my parameter files.

This has one drawback: If I check out an older version, I also get the old  
parameter file, which is not what I want, because the parameters are  
determined by hardware settings. I.e., I would like to checkout an old  
commit, but still have the last version of the parameter file.

I tried to solve the problem by

1. creating a branch 'parameters', which contains only the parameter files
2. ignore the parameters files with extension *.m in .gitignore in the  
code branches (master etc.)

This seemed to work at first, but when I switch back from the parameters  
branch to master, all *.m files are removed, although .gitignore of master  
contains '*.m'.

So apparently git removes during branch switch first the tracked files and  
than populates the working dir with the new files of master.

Now my questions are

1. Is there a way to work around it?
2. Is there a maybe totally different way to solve my initial problem  
(separate code history from parameter file history) without using two git  
repos?


Thanks a lot!

     Tilo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-05-02 15:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-01 12:57 How to manage parameter files and code separately using git? Tilo Schwarz
2010-05-01 17:18 ` Junio C Hamano
2010-05-02  9:18   ` Tilo Schwarz
2010-05-02 15:52     ` Junio C Hamano

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).