This will go mod init
and go mod tidy
based on the .git/config
's origin or upstream if it's from a fork.
Create this file on an existing Go project with go.mod
Build its binary to the root directory of your .git/config
: go build /home/me/mygit/.git/.. -o modinit
Run the binary: ./modinit