Last active
November 10, 2017 03:23
-
-
Save TonyRenHK/f104481b045fde58e767c029b077a662 to your computer and use it in GitHub Desktop.
Push your code to bitbucket direcly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
<<'COMMENT' | |
run : bash Gitshell.sh | |
COMMENT | |
echo "~~~~~~~~~~~~~~~~~Fisrt, Clone your repository~~~~~~~~~~~~~~~~~~" | |
git clone https://username:[email protected]/tonyrenhk/YourCodeRepository.git | |
#Set the time | |
now="$(date)" | |
# Call and run nodejs file | |
node retrieve_salesforce_Class_Page_code.js | |
echo "*****Finished*******" | |
# go to your repository folder and then delete related code | |
cd YourCodeRepository | |
rm -r "YourProjectName_" | |
#back to the 'backup' folder and move the code to your repository folder | |
cd ~/workspace/Backup | |
mv YourProjectName_ YourCodeRepository | |
# push your code to the bitbucket | |
cd YourCodeRepository | |
#set dynamic variable | |
R=$$ | |
gitvar="Z"$R | |
git add -A | |
git commit -m "$now" | |
git remote add $gitvar https://username:[email protected]/tonyrenhk/YourCodeRepository.git | |
git push -u $gitvar master | |
echo "***********************Finsihed Now***************" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment