I wanted to exclude a file called config / dbconfig.js in my public branch, which I use to click on github, but I can still click from master to my noester.com git repo to move on to production. I changed the configuration file to this:
[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true excludesfile = +info/exclude [remote "nodester"] url = *** My Git Repo *** fetch = +refs/heads/*:refs/remotes/nodester/* [branch "public"] excludesfile = +info/exclude_public
I definitely deleted the .gitignore file, and I use the .git / info / exclude file for a general exception and was hoping to use .git / info / exclude_public to exclude this file, so when I merge with the publication, that file does not merge and not Click on github.
If I do the following, it will still add the file to git even in the public branch. Therefore, I think that my syntax is incorrect or impossible.
$ git checkout public $ git add . $ git status # On branch public # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # new file: config/dbconfig.json #
If this is not possible, is there a better way to handle database configurations that you don't want to exit an open Github project without running two git repositories and manually merging between them?
source share