Я знаю, что опция -force-with-lease
позволяет мне нажимать на силу, только если я был последним коммиттером, но я хотел бы разрешить ее переопределение:
git push playground $current_branch:master --force-with-lease
if ! [[ "$?" == "0" ]]; then
last_committer="$(git some command)"
ask_continue "the last committer was $last_committer, would you like to push force?"
git push playground $current_branch:master --force
fi
В этом примере я хотел бы знать, чтоgit some command
будет.