0 Replies - 815 Views - Last Post: 30 March 2013 - 12:34 PM

#1 Duckington  Icon User is offline

  • D.I.C Addict

Reputation: 170
  • View blog
  • Posts: 608
  • Joined: 12-October 09

git logic question

Posted 30 March 2013 - 12:34 PM

So I'm in the process of setting up git on my linux server so I can push & pull to/from my development windows machine, but I've never set up a git environment before and I'm a little confused about something.

The first thing I did was create the git repo on the server over the main codebase.
Then I cloned that down onto my development pc
That worked fine, I can push & pull now.

Thing is there are various files that I don't want overriden when I push up to Dev since they are config files or files relevant to a specific environment like that.

So in my Local master branch I changed those files to have the local content (e.g. local DB config rather than proper server db config, etc...) added those files to gitignore, and that's fine I can push my master branch up without over-writing those particular files, so it works on local and on dev.

My question though concerns creating new branches.


When I create a new branch on my local machine, let's say "testBranch", that is obviusly a copy of my local master branch to start with, so it works in exactly the same way and those same files are ignored.

Now, if I were to push this testBranch up to Dev, it has ignored the DB config file (and others) so the branch on Dev now doesn't work because it can't connect to the database.


I'm sure this isn't what other people do, as then they'd have to go through and add all those files to the new Dev branch every time. So I feel I must be missing a step here.

Could anyone enlighten me as to where I'm going wrong?


Cheers.

Is This A Good Question/Topic? 0
  • +

Page 1 of 1