-1

I don't want to push my ini file to git repository and i want to read ini file from local machine.

Is it possible?

Renjith Thankachan
  • 4,178
  • 1
  • 30
  • 47
nrs
  • 937
  • 3
  • 17
  • 42
  • 2
    Possible duplicate of [how to read and write INI file with Python?](http://stackoverflow.com/questions/8884188/how-to-read-and-write-ini-file-with-python) – McGrady Mar 02 '17 at 06:59
  • @McGrady My question is little bit different...I don't want to push ini file to git repo and I need to read ini file from local machine. Is it possible? From git repo to my local path – nrs Mar 02 '17 at 07:03
  • 1
    @raghavendrat use .gitignore file – Renjith Thankachan Mar 02 '17 at 07:06
  • @sideffect0 Can u explain with example please.. – nrs Mar 02 '17 at 07:08

1 Answers1

3

To ignore any file to be added or pushed to remote repository use .gitignore file.
In your case use create a file named .gitignore in project directory with,

# .gitignore file
*.ini

on git if you already added or staged the file,

git reset HEAD <path to ini file>  

to remove file; dont forget to add .gitignore to git !

Renjith Thankachan
  • 4,178
  • 1
  • 30
  • 47