Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions git-pushdemont
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
#!/usr/bin/env bash

BRANCH=`git symbolic-ref --short HEAD`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a shebang line?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix'd

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check if git exists

REMOTE='origin'

git fetch $REMOTE
REMOTE_COMMIT=`git rev-parse $REMOTE/$BRANCH`

echo "Your commits are now being pushed"
git push -f $REMOTE $BRANCH

for i in 1 2 3 4 5 6 7 8
for i in {1..8}
do
sleep 1
echo "."
done

sleep 1
git push -f $REMOTE $REMOTE_COMMIT:$BRANCH
echo "push process is suspended"
# git push origin master -f # TODO uncomment this line someday