Skip to content

Commit 793d34b

Browse files
committed
Changes to commit changes
1 parent 3121cfe commit 793d34b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

EasyKey.git/ezk-git-functions.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,11 @@ function settingUp () {
384384
}
385385

386386
ammendCommit() {
387+
behind_count=$(git rev-list --count ${current_branch}..${current_branch}@{upstream})
388+
if [ $behind_count -gt 0 ]; then
389+
echo "Your branch is behind remote branch! Update first using git pull."
390+
return
391+
fi
387392
echo -n "Change some commit messages(y/n)?" && wait_for_keypress && echo
388393
[ "${REPLY}" != "y" ] && waitonexit && return
389394
git rebase -i HEAD~10

0 commit comments

Comments
 (0)