I have written a batch file for some git commands, here is the code
@echo off
setlocal
set /p branch_name=Enter the branch name:
rem Checkout a different branch
git checkout branch2
rem Delete the asked branch
git branch -D %branch_name%
git fetch
rem Checkout the asked branch again
git checkout %branch_name%
endlocal
now after git fetch
it asks for the passphrase for ssh key , that i want to fill automatically from the batch file
i tried with echo like this
echo passphrase | git fetch
but it did not work
any help on this?
And one more thing if on start it can ask do you want to use current branch then y/N. if y then no need to ask enter branch name otherwise ask the branch name to use?