New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pull, push: try reading git-bug.remote config value before defaulting to 'origin' when no explicit REMOTE argument #1076
base: master
Are you sure you want to change the base?
Conversation
… to 'origin' when no explicit REMOTE argument
Neat, thank you! I like the idea, but if I get that right, What about instead do something like |
If there's more than one remote, perhaps let the user select one? We'll have to guide the user to picking identities eventually (especially when there are keys involved.) |
My intention behind this was to make it easier to push git-bug data to a separate, standalone repository, and to reduce the risk of accidentally pushing to one that I wanted to keep clean. The inception of this idea comes from running into the user initialization issue--you can't pull into a repository without first creating a new user. See #1072. Which means I either have to manually delete[1] that new identity after the first pull into a newly cloned repository, or I end up with a new user for every repository I want to manage bugs in. I wouldn't mind taking a shot at #1072, but that's much more involved and I wanted to just get to a place where I could try out git-bug for awhile before fully committing to it; I didn't want to have any remnants in my central repository if things didn't work out. Regarding asking the user: At least for my open source projects, my working repositories usually have at least two upstream remotes: my own hosted server and GitHub. Similarly, for this particular project there's also at least two remotes counting the separate git-bug repository (standalone or not). Interactively asking the user every time would be annoying for my workflow. And if it kept state so it only needed to ask once, that's state I'd like to be able to manually control, just like with regular [1] I wasn't actually able to fully remove an identity from a repository. I can delete the identity from .git/refs/identities, but that still leaves around orphan objects in .git/objects which I couldn't figure out how to remove with git prune or git fsck. I don't think these objects would get pushed up. But once they did (e.g. by accident) you're back to square 1 in the sense that now your upstream repository will have been polluted with no simple way to remove the objects without recreating the repository. |
@wahern as you will see in #1072 , #1003 , the solution for that problem is different from what you suggest here. That said, your point about having multiple remote for different purpose makes sense. In that situation, the user is very likely to always interact with the same remote for bugs, so having a way to bake that is relevant. There is really
What about:
Do you think you could implement that? |
If think you are looking for |
I think the
This provides a pretty seamless workflow. An informational message could be logged if |
No description provided.