question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add a --no-history optin to avoid growing branch weight

See original GitHub issue

Hi there,

First of all, thanks for you tool. It’s really useful and easy to use.

As a new feature, I would suggest to add a --no-history option.

Deploying regularly to the branch gh-pages make its the git history growing again and again. But this branch (or any branch used to host static content) doesn’t really need to be versioned into the history.

There is a similar tool written in nodejs which has an option --no-history to overwrite the previous commit: gh-pages. It’s reported that it works well, as it in a GH Action.

- name: deploy to gh pages
  run: |
    echo "Deploying to directory: ${{env.BRANCH_NAME}}"
    git config --global user.name "github-actions[bot]"
    git config --global user.email "github-actions[bot]@users.noreply.github.com"
    npx gh-pages --dist dist/ --dest ${{env.BRANCH_NAME}} --remove "${{env.BRANCH_NAME}}/**" --no-history --repo "https://${GITHUB_ACTOR}:${{secrets.GITHUB_TOKEN}}@github.com/${GITHUB_REPOSITORY}.git"

NPM option: https://www.npmjs.com/package/gh-pages#optionshistory

Original issue: https://github.com/geotribu/website/issues/302 by @fgravin

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
c-wcommented, Mar 19, 2021

Thanks for confirming. The functionality has been released in version 1.1.0.

0reactions
Gutscommented, Mar 19, 2021

You’re right, here comes more information to track on this.

Sys info

$ git --version
git version 2.31.0
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.2 LTS
Release:	20.04
Codename:	focal

Repository used to test

Repo main page: https://github.com/Guts/DicoGIS gh-pages branch: https://github.com/Guts/DicoGIS/tree/gh-pages

Published doc: https://guts.github.io/DicoGIS/ with page about doc process https://guts.github.io/DicoGIS/development/documentation.html

Github Action: https://github.com/Guts/DicoGIS/blob/master/.github/workflows/docs_builder.yml

Conclusion

It was just about options order and positional arg:

  • 🔴 ghp-import --force --no-jekyll --push docs/_build/html --no-history
  • ✔️ ghp-import --force --no-jekyll --push --no-history docs/_build/html

😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git submodule without extra weight - Stack Overflow
When I add shallow submodule with master-src branch I do get only the files that are part of master-src branch, however, also sparce...
Read more >
Intraductal Papillary Mucinous Neoplasm of Pancreas - NCBI
IPMN is a pancreatic exocrine tumor composed of intraductal papillary growth of mucin containing neoplastic cells in the MPD or its major branches....
Read more >
PeopleSoft 9.2: Staffing Front Office - Oracle Help Center
Define branch information and business unit mapping. Related Links. "Installation Options - Staffing Installation Page (PeopleSoft FSCM 9.2: Application ...
Read more >
WHO guidelines on drawing blood best practices in phlebotomy
One important measure to prevent infection is to recruit donors from populations that are known to have low rates of infection for bloodborne...
Read more >
Association Between Maternal Caffeine Consumption and ...
Increasing caffeine measures were significantly associated with lower birth weight, shorter length, and smaller head, arm, and thigh ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found