All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tilo Schwarz" <tilo@tilo-schwarz.de>
To: git@vger.kernel.org
Subject: How to manage parameter files and code separately using git?
Date: Sat, 01 May 2010 14:57:31 +0200	[thread overview]
Message-ID: <op.vb0195s1a8ed4e@dellschleppa> (raw)

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

             reply	other threads:[~2010-05-01 12:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-01 12:57 Tilo Schwarz [this message]
2010-05-01 17:18 ` How to manage parameter files and code separately using git? Junio C Hamano
2010-05-02  9:18   ` Tilo Schwarz
2010-05-02 15:52     ` Junio C Hamano

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=op.vb0195s1a8ed4e@dellschleppa \
    --to=tilo@tilo-schwarz.de \
    --cc=git@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.