Remote server:
git init
git config receive.denyCurrentBranch updateInstead
touch .git/hooks/post-receive
chmod +x .git/hooks/post-receive.git/hooks/post-receive
#!/bin/bash
cd .. # because cwd is .git by default
# run build and deploy commandsLocal:
git remote add production [email protected]:repos/myproject
git push production main