Skip to content

Instantly share code, notes, and snippets.

@ahampriyanshu
Last active January 15, 2022 11:43
Show Gist options
  • Save ahampriyanshu/86e0a1e1fcfc3f3ec0849a2840551869 to your computer and use it in GitHub Desktop.
Save ahampriyanshu/86e0a1e1fcfc3f3ec0849a2840551869 to your computer and use it in GitHub Desktop.
Bash script to push changes in a MERN app
#!/bin/sh
cd ~/app-name/client
git add .
git commit -m "$1"
git push
rm -rf build
npm run build
rm -rf ../server/public
mv build ../server/public
cd ../server
git add .
git commit -m "$1"
git push
ssh server_ip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment