Skip to content
Draft
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
16 changes: 16 additions & 0 deletions src/current/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,19 @@ clean-site:

clean-cache:
rm -rf .jekyll-cache

.PHONY: git-retry
git-retry:
@echo "This will replace the last commit on the remote branch with an identical one,"
@echo "except for its timestamp and SHA, to kick off a new preview build."
@read -p "Proceed? (y/N): " confirm && \
if [ "$$confirm" = "y" ] || [ "$$confirm" = "Y" ]; then \
BRANCH=$$(git rev-parse --abbrev-ref HEAD); \
echo "Working on branch: $$BRANCH"; \
git pull && \
git commit --amend --no-edit --allow-empty && \
git push --force origin $$BRANCH && \
echo "✓ Successfully pushed amended commit to $$BRANCH"; \
else \
echo "Aborted."; \
fi