How to automate these commands in windows. Answer could be obvious ".bat" file.
sample.bat
C:\Program Files\Git\git-bash.exe
cd c:\directory\
eval $(ssh-agent -s) && ssh-add "id_rsa"
git clone repo
By doing this, a new bash window opens but i don't see these commands executing there.
And also, how do i do this via jenkins as well (On windows slave) ?
Answer (As suggested by poke): Passing multiple arguments as well.
git-bash.exe -c "cd /c/dictionary; eval $(ssh-agent -s) && ssh-add 'id_rsa'; git clone repo"