You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As an operator,
In order to prevent pushing by mistake a featre branch with many commits (typically created from another release),
I need the git push alias to get confirmation when number of commits to be pushed exceed 5
#See https://stackoverflow.com/a/61395451/1484823
NB_COMMITS_TO_PUSH=$(git rev-list origin/main.. --count)if [[ ${NB_COMMITS_TO_PUSH}-gt 5 ]];thenecho"Are you sure to push ${NB_COMMITS_TO_PUSH} commits to branch origin/main? Is you branch based on the right source branch ?"
....
fi
Expected behavior
As an operator,
In order to prevent pushing by mistake a featre branch with many commits (typically created from another release),
I need the git push alias to get confirmation when number of commits to be pushed exceed 5
See also related git commands to list commits yet to be pushed https://stackoverflow.com/questions/2016901/how-to-list-unpushed-git-commits-local-but-not-on-origin/2016954#2016954
Observed behavior
The text was updated successfully, but these errors were encountered: