foriequal0 / git-trim

Automatically trims your branches whose tracking remote refs are merged or stray
MIT License
492 stars 14 forks source link

Survey: Are you using push upstream (`git config remote.*.push`)? #134

Open foriequal0 opened 4 years ago

foriequal0 commented 4 years ago

Hi! I think you've come here after seeing the "Help wanted!" message in git-trim. This was the message:

Help wanted!
I recognize that you've set a config `git config remote.origin.push`!
I once (mis)used that config to classify branches, but I retracted it after realizing that I don't understand the config well.
It would be very helpful to me if you share your use cases of the config to me.
Here's the survey URL: https://github.com/foriequal0/git-trim/issues/134
Thank you!

As you saw in the message, I'm lack of understanding about git config remote.<name>.push. Even Google doesn't seem to know about it (there is about 600 search results at the time of writing).

So I retracted it to reduce the surface of the git-trim for now, and to focus on simpler use cases. But I still expect that there are interesting scenarios and useful properties on it. So I've opened this survey to hear use cases of it from you.

foriequal0 commented 4 years ago

I've found a slide about push upstream usage on Gerrit. https://geekdani.files.wordpress.com/2012/05/gerrit.pdf I haven't used Gerrit. So it left me some questions.

siedentop commented 4 years ago

Hi, nice tool!

I found this survey by reading through the open issues.

To answer your question:

I have been using differing push and fetch remotes. Here's a typical example: Pull/Fetch from an upstream repo (on Github), and push to my fork of that repo (again on Github). That works pretty well to keep my fork in sync with upstream.

I don't care if this use case is unsupported in git-trim. The reason is that if I am doing something outside the ordinary, I wouldn't expect this tool to help. Furthermore, in my use case above, I only care about the main/master branch on upstream.

Feel free to ask further questions.

-- I am commenting on this issue in a private capacity.

foriequal0 commented 4 years ago

Hi @siedentop ! Thank you for your response! I'm aware of the workflow that you've described as triangular workflows. I had used it before for a while. They are covered by tests here https://github.com/foriequal0/git-trim/tree/master/tests. You can see them in triangular_*.rs files if you want to :) Let me know if you find something that is out of your expectations.