On Mon, 3 Sep 2012 02:29:12 -0700 (PDT)
mem <talofo.l...@gmail.com> wrote:

> While checkout to master branch, I got:
> Error: The following untracked working tree files would be
> overwritten by checkout:
> nbproject/private/config.properties
> nbproject/private/private.properties
> nbproject/private/private.xml
> nbproject/project.properties
> nbproject/project.xml 
> dev is ignoring those files. master isn't, because no .gitignore file
> is present there. Perhaps, when I was setting branches, I forgot it
> somehow...
> They should both ignore those files.
> Plus, when I push this to remote repos, those changes should be
> propagated for those remote repos as well. (I'm using a bare repo).

Since .gitignore is a part of the repository snapshot forming a commit,
it will be "propagated" when people check out that state.

> My question is:
> *How can we add that .gitignore file to the master, so that this
> doesn't happen again ?*

I'm a bit confused because the straightforward answer seems to be a
bit too easy to be serious: "just check out the `master' branch,
add .gitignore file and commit" or, alternatively, cherry-pick the
necessary commit(s) which dealt with .gitignore from your "dev" branch.

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to