Comments (7)
What's the point? git pull --rebase
only works on a clean working directory.
from np.
The point would be to error out with Local/Remote history differs. Please push/pull changes.
instead of automatically rebasing. I personally feel that rebasing it not always what I want to do.
This would give the user a chance to see what the remote changes was before going thru and publishing it to npm.
A problem that I see currently is that this script will publish anything commited to the remote at the time I run this command. I think it would be better to tell me that there has been new commits at the remote, and let med deal with what I want to do with that.
Let me know if I'm not making sense :)
from np.
Oh yeah. That does make sense. Thanks for elaborating. PR welcome ;)
from np.
@LinusU Interested in doing a PR? 🍰
from np.
Yes, but I'm a bit behind on my pr queue :)
I'm going to take a stab at the queue now so hopefully, you'll see some pull request for me, if not for this repo...
from np.
Instead of grep '^# Your branch'
, maybe use:
# check if behind
$ git rev-list --right-only --count HEAD...@'{u}'
# check if ahead
$ git rev-list --left-only --count HEAD...@'{u}'
from np.
I would tend to agree with @kevva.
My git status doesn't start with #
, and instead just starts with Your branch
.
So going off of his suggestion, you could probably do:
# history differs
test "00" -ne `git fetch; git rev-list --count --left-right "@{upstream}"...HEAD | awk '{ print $1$2 }'`
from np.
Related Issues (20)
- use pnpm
- np v8 breaking bug: NPM version check fails when `npm` is not specified in engines field in package.json HOT 2
- Won't work if dependencies are not defined
- unable to publish package using Yarn -- cannot read properties of undefined (reading 'pipe') HOT 6
- np command not execute HOT 3
- SyntaxError: Unexpected token '&&=' HOT 1
- How to publish with --provenance?
- Proposal: backwards-compatible compression before publish HOT 2
- Unable to publish preview (`publish.getPackagePublishArguments` is not a function) HOT 1
- Allow creating a GitHub draft release without generating release notes
- ls-collaborators is not a valid access command with npm v9 HOT 5
- np output command error
- np error ERR_REQUIRE_ESM HOT 2
- Provide a way to silently approve in advanced files that won't be part of the published package
- `ENOWORKSPACES` when publishing from workspace HOT 1
- np command extremely slow HOT 7
- how to hook in to publish a bundle with injected version HOT 1
- Doesn't include `dist` folder HOT 5
- np hangs while publishing HOT 4
- Open npmjs.com instead of asking for OTP HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from np.