Code Monkey home page Code Monkey logo

Comments (6)

sindresorhus avatar sindresorhus commented on May 17, 2024

I would say that's a problem with your git config. Why would you set default to nothing? We can't specify origin master as the user might use a different name of their remote and different branch name.

from np.

aymericbeaumet avatar aymericbeaumet commented on May 17, 2024

I guess it's a matter of personal taste, I like the strictness brought by having to specify the remote/branch. Still I would like to be able to use np.

Maybe something in the lines of: np major --remote=origin --branch=master

from np.

aymericbeaumet avatar aymericbeaumet commented on May 17, 2024

They would be mutually required. Fallback to git push if not specified.

from np.

aymericbeaumet avatar aymericbeaumet commented on May 17, 2024

Another solution might be to allow to disable the push: np major --no-git-push, and let the user do it by herself

from np.

sindresorhus avatar sindresorhus commented on May 17, 2024

Have you considered setting default to simple?

simple - in centralized workflow, work like upstream with an added safety to refuse to push if the upstream branch's name is different from the local one.
When pushing to a remote that is different from the remote you normally pull from, work as current. This is the safest option and is suited for beginners.
This mode will become the default in Git 2.0.

from np.

aymericbeaumet avatar aymericbeaumet commented on May 17, 2024

I think we've seen the same SO thread, yeah might be the simplest solution here.

from np.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.