1

I am new at user control systems. I wondered something while pushing project. My project is including server ip address, username and password informations. Or a file. Because some projects are in public repository.

How can I hide these isnformations before push project to version control system. If manually, I can forget it. Is there a way automatically?

I am using visula studio, Git, TFS.

barteloma
  • 6,403
  • 14
  • 79
  • 173

1 Answers1

2

You have at least three options:

  • To completely ignore these files, add them to .gitignore.

  • If you just want to keep some information private, commit the files without the sensitive information and hold the information in another file that you ignore and that gets included from the versioned ones.

  • Using git filters would also be an option; see https://stackoverflow.com/a/22954399/520162 for a short introduction to filters: your clean filter would remove your private information from the files while the smudge filter would fill in username, password, etc.

Community
  • 1
  • 1
eckes
  • 64,417
  • 29
  • 168
  • 201