Michael Michael - 1 year ago 148
Git Question

Use git non invasively

I have a somewhat nasty build system that will choke as soon as it finds any unexpected files or directories. I'd like to add version control with git now without any change in the build process. (I can not/do not want to change this at the moment.)

Problem: Git will also leave some files/directories in that tree.

Is there a way to have git store any of its file externally and not put anything into the version controlled directories?

Answer Source

yes set the environment variable GIT_DIR to another directory, then use GIT as normal. Git will use the directory specified by GIT_DIR for all it's repository files.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download