Skip to content

Instantly share code, notes, and snippets.

@engineerbaz
Created March 23, 2020 04:22
Show Gist options
  • Save engineerbaz/220663797e000af169f386d11b9f8648 to your computer and use it in GitHub Desktop.
Save engineerbaz/220663797e000af169f386d11b9f8648 to your computer and use it in GitHub Desktop.
For Committing & pushing single file to remote repo of GitHub
RED='\033[0;31m'
NC='\033[0m'
GREEN='\033[0;32m'
BLUE='\033[0;34m'
echo -e "\n****** Welcome to ${RED}Git${NC} Script by ${GREEN}BAZ${NC} **$
echo "This script will upadte file to GtHub by taking filename input!"
ls
git status
echo -e "\n ${BLUE}Please enter file name you want to upload to remote re$
read fname
git add $fname
git commit -m "update on file $fname"
git push origin master
echo " "
echo -e "--------- ${BLUE}Completed update on Git ------"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment