Solidity – How to Fix `forge update` Error in EVM, Foundry, and Rust

evmforgefoundryrustsolidity

When I originally type forge update I get returned this:

Error: fatal: Needed a single revision Unable to find current origin/v1.3.0 revision in submodule path 'lib/forge-std'

After following steps to update git to the latest version, (sudo apt-get update followed by sudo apt upgrade updated git for me. You can check what version you are using via git --version), I was able to get forge update to return only this:

Error: Unable to find current origin/v1.3.0 revision in submodule path 'lib/forge-std'

But how can I get it to not return an error message at all?
Here is a related thread

Best Answer

I am not sure if the forge update command still works as expected, however, I was able to remove the error message by commenting out the branch = v1.3.0 line inside of my .gitmodules file. Thanks to this comment for the "cursed" solution.