akonwi / git-plus

vim-fugitive like package for atom. make commits and other git things without the terminal
MIT License
537 stars 163 forks source link

Any way to ignore remote sources and choose a "default"? #351

Open chenasraf opened 8 years ago

chenasraf commented 8 years ago

I have 3 remotes for my git repo:

I'd like to automatically select "origin" so I don't get the intermediate modal that lets me choose every time. This should be relevant to one project. Is that achievable?

akonwi commented 8 years ago

I can't think of a simple way to do this.

  1. My first thought is to assume the first remote selected in the project is the default but that would lead to problems.
  2. Another way is to have users add extra git-plus related options to the repo's gitconfig. That's less messy although I'm not sure how people may feel about that.
  3. Lastly, there could be a package command to set the default and another command to push to default. I'm iffy on having a pair of commands for this.

Of these I'm leaning more towards option 2. What do you think?

chenasraf commented 8 years ago

I like option 2 better too, but how about a CSON file instead? Something along the format of:

'/Users/myuser/Dev/projectDir':
    'remote-default': 'origin'
    # other configurable stuff in the future

This could be accessible from the package settings and command palette (same way color-tabs-regex does it for example)

akonwi commented 8 years ago

Oh that's even better. The next two priorities I have are allowing support for non-ssh users and showing diffs during commits. If you want to take a stab at implementing this, that would be great

chenasraf commented 8 years ago

I'm not really experienced with atom packages, but I'll give it a go. :) :+1:

orensol commented 8 years ago

:+1: for the feature request, and option 3 in my opinion is better because it's more atom-y, in the sense that commands are so easily accessible and easy to find through the command palette. But option 2 works as well :) Any update on this feature being implemented?

akonwi commented 7 years ago

@orensol I haven't picked this up yet. You make a good point about option 2 being more atom-y. Whenever this gets picked up, that should be the route taken and we can leverage atom's ability to manage state