On 22.11.2011 16:21, Pascal Obry wrote:
In fact I want to do that in a branch (say work) and keep master as-is
as this branch is used to pull changes from origin. And in this case,
doing 'git diff master' still shows the files under src2. See script to
reproduce:
[...]
# let's replace src2 by sd in branch work
git checkout -b work
git rm src2/*
git ci -m "no more src2"
# ln -s ../sd src2
cp -r ../sd src2
# make sure src2 is excluded
echo 'src2'>> .git/info/exclude
# the following output should be clean
echo '============== Status'
git status
echo '============== Diff'
git diff
echo '============== Diff master'
git diff master
Is that possible?
In my not-really-expert opinion no. At least git diff master has to show
something because there obviously is a difference between what is in
master (that you can't gitignore) and your branch (whether you ignore it
or not).
I would
a) use a different directory name for src2 and adapt the Makefile to
cope with that
or
b) remove the src2 link from .git/info/exclude and commit it into the
branch. That way whenever you switch branch and master, the correct dir
or link will be present and still because of the link none of the files
in the svn will be handled by git in any way
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html