-1

I'd like to keep some private information (files/folders) on the local git directories (say server info etc) but everything else pushed to a public server say GitHub.

Of course I'd backup all the files locally as well.

What is the proper way of achieving my aim. .gitignore?

user1860288
  • 512
  • 2
  • 6
  • 18
  • If you have found a solution to your question , you could either accept the answer or mark it as duplicate for the link given in my post – Dev-vruper Feb 11 '21 at 17:30

2 Answers2

1

I think modifying .gitignore in your case would be a helpful and easy way to ignore files and folders . We also do store all our server info locally in properties files and ignore them .

Eg :

filename.properties
*.properties
folder-path/

Additionally you can check this answer as well .gitignore exclude folder but include specific subfolder

Dev-vruper
  • 421
  • 3
  • 12
0

You will be having a file named ".gitignore" in your project path. open that in a text editor and whether the path is mentioned in the git ignore file. If so, just remove that from the file and save it then you should be able to commit and push