Hello all, Is there any way that i can remotely push my recent changes related to file transfer or file changes from one server to other using git repository to jenkins.
eg: if my local repository has any file changes i am pushing it to my repository using below set of command in a script: #!/bin/bash . inputfile.txt cp -r $DIR . git config --global user.email "some email" git config --global user.name "Some user name" git add . commitMessage="commiting the new file" echo $commitMessage #read commitMessage git commit -m "$commitMessage" git remote set-url origin somerepositoryurl.git branch=master echo $branch #read branch git push origin master --force sleep 10 echo "execute piecebypiece now" ./piecebypiece.sh echo "script execution done" when i run this script in local it works fine and push the latest changes but when i run the same in jenkins below error is encountererd: error: src refspec master does not match any. error: failed to push some refs to 'gitrepository.git <https://Sakshi.Rathore%40bgw-online.de:sherlock%40...@github.com/sakshirathorebgw/GitHubProjeckt.git> ' if i make changes in inputfile.txt and run script on jenkins those changes are not visible untill i run script on local. Could you please advise how can my recent changes can come to jenkins if i directly execute script in jenkins. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a351a7ac-ffa8-447c-ac10-efd1567e3909n%40googlegroups.com.