Timeline for Hiding WLAN password when pushing to GitHub
Current License: CC BY-SA 3.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 9, 2017 at 11:33 | comment | added | Andrew Doble |
Eventually settled on the approach of adding the credentials.h reference to the .git/info/exclude file and having a dummy credentials_CUSTOMIZE_ME.h file tracked by git (as explained above). Also, added a README.md file to explain everything. Not using a Makefile at the moment, but that may change. Many thanks all for your help.
|
|
| Jul 8, 2017 at 19:36 | history | edited | Edgar Bonet | CC BY-SA 3.0 |
+ option with a Makefile
|
| Jul 8, 2017 at 18:23 | comment | added | Chris Stratton |
Actually, nevermind, my idea won't work since the #include will fail without the custom message. Really shows the primitiveness of the Arduino IDE compared to something permitting a sensible project file or a custom Makefile.
|
|
| Jul 8, 2017 at 18:11 | comment | added | Chris Stratton |
If you commit a dummy version, yes. You may want to give the dummy version a different name, like credentials.h.CUSTOMIZE_ME or something, and perhaps back it up with a #ifndef #error giving instructions to make a copy without the suffix and edit.
|
|
| Jul 8, 2017 at 17:59 | comment | added | Edgar Bonet | @ChrisStratton: In my test, I added and committed the dummy credentials.h, then modified the file and added it to .gitignore. Git kept telling me “Changes not staged for commit: modified: credentials.h”. My point was to have a compilable version on the repo, hence the dummy credentials.h added there. | |
| Jul 8, 2017 at 17:48 | comment | added | Chris Stratton | This is a better solution, however, no, git will not tell you about changes to files in .gitignore unless you explicitly add them. And adding a file explicitly excluded by .gitignore typically requires adding with a force flag. | |
| Jul 8, 2017 at 17:21 | comment | added | Andrew Doble | Interesting points and thanks. Looks like I am going to have to be more careful in how I use git. | |
| Jul 8, 2017 at 16:47 | history | answered | Edgar Bonet | CC BY-SA 3.0 |