thanks for reply. I'm aware of .gitignore. Originally my task was to avoid
some files to be merged from one branch to another. Git is working with
commits. So excludesfile as well as .gitignore won't help to exclude some
files. Lately I found
the same problem I have and a solution to it. Do you know any
better way to solve this?
Nevertheless excludesfile doesn't work as I expect :(
On Sunday, June 10, 2012 5:44:20 PM UTC+4, Thomas Ferris Nicolaisen wrote:
> Just checking here, are you aware of the "normal" way of excluding files
> with .gitignore files? I see you have one there in your working directory
> but maybe you haven't made use of it yet.
> The .git/info/excludes is more for the case where *you* want to ignore
> something, but don't want to share this configurations with others cloning
> the repository.
> The nice thing with .gitignore files is that they can be checked into
> specific branches, thereby avoiding your problems.
> Try this:
> git checkout master
> echo TODO.txt >> .gitignore
> git add .gitignore
> git commit -m "Ignoring TODO text files"
> I don't believe they work differently on Windows 7, but if you still can't
> get it working, I can fire up Windows here and figure it out.
> If you still want to do it using the excludes file, there's a writeup on
> how to do it here:
> And the official docs on: http://git-scm.com/docs/gitignore
> On Sunday, June 10, 2012 2:52:14 PM UTC+2, Alexander Myltsev wrote:
>> Good day!
>> I need excludesfile for a specific branch.
>> $ git config --local branch.master.excludesfile
>> $ ls .git/info/
>> exclude exclude_public refs
>> $ cat .git/info/exclude_public
>> $ git status
>> # On branch master
>> # Untracked files:
>> # (use "git add <file>..." to include in what will be committed)
>> # .gitignore
>> *# TODO.txt*
>> nothing added to commit but untracked files present (use "git add" to
>> Does excludesfile work properly on Windows 7? What am I doing wrong?
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To view this discussion on the web visit
To post to this group, send email to firstname.lastname@example.org.
To unsubscribe from this group, send email to
For more options, visit this group at