I tried to clone the git repository by passing the username, password. That was successful.
But what my intention is that I want to know whether the git clone command executed or not. If not, I would like to handle such kind of errors in shell script itself.
My working shell script:
cd ..
git clone https://username:[email protected]/username/repositoryname.git
cd repositoryname
git checkout branchname1
cd ..
mv repositoryname newfoldername
git clone https://username:[email protected]/username/respositoryname.git
cd repositoryname
git checkout branchname2
cd ..
mv repositoryname newfoldername
How do I test, in the script, whether these steps were successful?