You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2026/04/24 05:55:17 UTC
(pulsar-site) 04/05: Update details about truncating history for asf-site-next branch
This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git
commit b20165dce6b76903eda7cbd83bfa288dfd682751
Author: Lari Hotari <lh...@users.noreply.github.com>
AuthorDate: Fri Apr 24 08:40:48 2026 +0300
Update details about truncating history for asf-site-next branch
---
README.md | 8 ++++----
tools/pytools/README.md | 18 ++++++------------
2 files changed, 10 insertions(+), 16 deletions(-)
diff --git a/README.md b/README.md
index 454d680c325..da49724db32 100644
--- a/README.md
+++ b/README.md
@@ -62,12 +62,12 @@ To reference the same values from React components, import from
If the https://pulsar.apache.org website doesn't get updated, [check the latest GitHub Actions workflow run for the main branch](https://github.com/apache/pulsar-site/actions/workflows/ci-build-site.yml?query=branch%3Amain). If it succeeded, the problem could be that the [git history for the asf-site-next branch](https://github.com/apache/pulsar-site/commits/asf-site-next/) is too large and needs to be truncated. Here are the commands to perform that task:
```shell
-git clone -b asf-site-next https://github.com/apache/pulsar-site pulsar-site-static
+git clone --depth 1 -b asf-site-next https://github.com/apache/pulsar-site pulsar-site-static
cd pulsar-site-static
-git checkout --orphan asf-site-next-reset
+git checkout --orphan asf-site-next-truncated
git add -A
-git commit -m "History resetted"
-git push -f HEAD:asf-site-next
+git commit -m "History truncated"
+git push -f origin HEAD:asf-site-next
```
## Contact information
diff --git a/tools/pytools/README.md b/tools/pytools/README.md
index b53eb3125e6..da27d4558f5 100644
--- a/tools/pytools/README.md
+++ b/tools/pytools/README.md
@@ -140,18 +140,12 @@ If files don't get updated in the published website although site publishing is
This is how to clean the history of `asf-site-next` branch:
```shell
-git clone --depth 1 --branch asf-site-next https://github.com/apache/pulsar-site.git
-cd pulsar-site
-# create a new empty branch
-git checkout --orphan asf-site-next-temp
-# copy all files from asf-site-next branch
-git checkout asf-site-next -- .
-# add all files to the new branch
-git add .* *
-# reuse the commit message of asf-site-next branch
-git commit --reuse-message=asf-site-next --no-edit
-# force push the new branch to remote as asf-site-next branch
-git push --force origin asf-site-next-temp:asf-site-next
+git clone --depth 1 -b asf-site-next https://github.com/apache/pulsar-site pulsar-site-static
+cd pulsar-site-static
+git checkout --orphan asf-site-next-reset
+git add -A
+git commit -m "History truncated"
+git push -f origin HEAD:asf-site-next
```
If push fails, you might need to remove branch protection of `asf-site-next` branch. This is handled in the `.asf.yaml` file of the `main` branch.
\ No newline at end of file