Skip to content
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

Badmailfromto whitespace #273

Merged
merged 3 commits into from
Oct 2, 2016
Merged

Conversation

salvis
Copy link
Contributor

@salvis salvis commented Sep 30, 2016

This is just a nit, but I got bitten by the fact that the badmailfromto configuration file allows only one tab (other than the other badmailxxx files).

@coveralls
Copy link

coveralls commented Sep 30, 2016

Coverage Status

Coverage remained the same at 48.84% when pulling 99f62cc on salvis:badmailfromto-whitespace into 494dc95 on smtpd:master.

@salvis
Copy link
Contributor Author

salvis commented Oct 1, 2016

I'm struggling with GitHub here! I have yet to find out how to resync my fork with upstream without introducing junk commits...

I guess it was a mistake to post a pull request from my fork's master branch, but I don't know how to recover. On GitHub I'm missing the tools like rebase and reset that I have on the local Git repository. GitHub and Google only give me partial instructions for doing isolated tasks, and they typically involve remote-controlling GitHub from the local repo -- can anyone point me to a description of a reasonable workflow involving the upstream, fork, and local repos?

@msimerson
Copy link
Member

Here's mine:

alias grum='git remote update matt && git rebase matt/master && git push -f matt'

In every repo I work in (gack, many dozens), I set my fork to be named matt, and then this alias will rebase whatever branch I'm on against master and then force push it to GitHub. If there's commits I need to squash or remove, then I do a git rebase -i

@msimerson msimerson merged commit 4e8cb7b into smtpd:master Oct 2, 2016
@msimerson
Copy link
Member

In this case, GitHub lets us (the repo owners) to a Squash-and-Merge, so we don't have to ask you to do it yourself. :-)

@salvis
Copy link
Contributor Author

salvis commented Oct 4, 2016

Please forgive me for being dense.

You're renaming 'origin' (i.e. GitHub) to 'matt' in your local repo, right? That's just cosmetics, you might as well use 'origin', no?

In my prior attempt I sent a pull request for a commit in my salvis:master -- that was probably not a good idea. So this time I created a feature branch and sent a pull request for the commit in salvis:badmailfromto-whitespace. You pulled it, creating a commit in smtpd:master.

Now I have to get that commit back into salvis:master to resync my fork with upstream, no? If I had a command line on GitHub, I'd do a git pull, but I don't have that... Do I have to send a pull request from smdpd:master to salvis:master? That feels backward...

What should your alias do? It doesn't seem to do anything for me, I guess because I don't have the commit from smtpd:master in salvis:master.

In this case, GitHub lets us (the repo owners) to a Squash-and-Merge, so we don't have to ask you to do it yourself. :-)

How would I do this myself? I would love to do this myself, but I don't seem to have any tools here on GitHub (short of pull requests), and the more I try to do from my local repository the more I get entangled in merges...

@salvis salvis deleted the badmailfromto-whitespace branch October 4, 2016 23:47
@msimerson
Copy link
Member

You're renaming 'origin' (i.e. GitHub) to 'matt' in your local repo, right?

Correct.

That's just cosmetics, you might as well use 'origin', no?

It would be, if I primarily worked in one or two repos. However, I routinely work in dozens of repos in a handful or organizations, and with a variety of backings (private git repo, GitHub Enterprise, github.com, etc.). Which means, I've often doing a git remote -v to see what origin is, and whether pushing to it is likely to work.

Using a name like matt has a very specific meaning. It's my fork, and it'll push to my repo. Every time. :)

Now I have to get that commit back into salvis:master to resync my fork with upstream, no?

Correct. I do that with another alias:

alias gruo='git remote update origin && git rebase origin/master && git push matt'

In this case, origin is the upstream / canonical repo.

@salvis
Copy link
Contributor Author

salvis commented Oct 5, 2016

Thank you very much, now I've been able to clean everything up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants