Allow publishing with uncommitted changes in working tree

See original GitHub issue

This might be a feature request, but I’m no longer able to use Lerna in react-cosmos since this check has been introduced.

$ lerna publish --no-git-tag-version --no-push --npm-tag=next lerna notice cli v3.1.1 lerna ERR! EUNCOMMIT Working tree has uncommitted changes, please commit or remove changes before continuing.

Here are the publishing steps I follow:

  • Context: In our monorepo all packages point to src by default
  • Before publishing, a custom script builds all packages and changes entry points to dist
  • Publish to npm via Lerna --no-git-tag-version --no-push (with uncommitted changes) — Except this doesn’t work anymore
  • Run custom script to point packages to src again (clean working tree)
  • Git commit and push via Lerna version

Is there a way to keep maintaining this flow with the latest API (v3.1.1.)? Maybe an option to skip the clean working tree check?

Feel free to propose alternative workflows that meet this criteria: Code published slightly differs from code pushed to git repo (ie. code published points to dist while code versioned points to src).


PS: I appreciate all the work you’ve put into making v3 solid!

Is there any blog post or changelog entry where I can read about all the changes from v2 to v3, to understand the migration better?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
djskinnercommented, Aug 21, 2018

This little known feature of git did the trick for us: git update-index --assume-unchanged .npmrc

0reactions
lock[bot]commented, Dec 27, 2018

This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

@lerna/collect-uncommitted | Yarn - Package Manager
Collect uncommitted changes to working tree for display in error messages ... All notable changes to this project will be documented in this...
Read more >
How does Git know if you have uncommitted changes in the ...
As it turns out, the git-status command intersects with the Git differ and the way that state about the current working tree is...
Read more >
Xcode: "The working copy ____ has uncommitted changes" vs ...
Go to your working folder in Terminal, type: git status. That will show you what files have uncommitted changes. Crashlytics, for instance ...
Read more >
Git - Tutorial - Vogella.com
After doing changes in the working tree, the user can capture new versions of the files in the ... Allow rebasing with uncommitted...
Read more >
On undoing, fixing, or removing commits in git - Seth Robertson
So you have committed. However, before we go about fixing or removing whatever is wrong, you should first ensure that any uncommitted changes...
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