I'm using Visual Studio Code and PlatformIO.
I added some libraries to my project using platformio.ini:
lib_deps =
olikraus/U8g2@^2.34.4
crankyoldgit/IRremoteESP8266@^2.8.4
plerup/EspSoftwareSerial@^6.16.1
rlogiacco/CircularBuffer@^1.3.3
https://github.com/me-no-dev/ESPAsyncWebServer.git
makuna/NeoPixelBus@^2.7.0
adafruit/Adafruit BusIO@^1.13.2
bblanchon/ArduinoJson@^6.19.4
adafruit/Adafruit PN532@^1.2.2
khoih-prog/ESPAsync_WiFiManager@^1.15.1
https://github.com/guestisp/ESP32AsyncDNSServer.git
Now, let's say I have to "hack" few lines of code inside a library to fit my needs. Since it's a very specific change (not something that can be useful to others) I can easily change directly the source code without forking it on github.
The downside is every time I download again the libraries (or set up another dev machine) I lose all my changes.
I can also move the downloaded library to the lib/ subfolder in the project tree, removing the dependency from lib_deps.
I wonder if there is a more reliable way to do this, i.e. applying a patch after downloading the code (yocto-like).