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

Fixes #1199 - Simple bugform.js cleanup #1435

Merged
merged 1 commit into from
Mar 27, 2017

Conversation

laghee
Copy link
Contributor

@laghee laghee commented Mar 22, 2017

Copy link
Member

@miketaylr miketaylr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! The only thing we need to do before landing is squash the two commits into one.

You can do that in a number of ways, but the simplest (for me, anyways) is via an interactive rebase:

git rebase -i HEAD~2

screen shot 2017-03-22 at 1 54 39 pm

Then you want to mark the second commit as the one to be squashed, by changing pick to s or squash:

screen shot 2017-03-22 at 1 55 27 pm

Save that file, then you need to push back the new, single commit to this PR by doing the following:

git push -f

@miketaylr
Copy link
Member

(let me know if that's confusing, i can also do it for you if you'd prefer!)

@laghee
Copy link
Contributor Author

laghee commented Mar 22, 2017

I think I did it successfully. It was confusing at first because the difference between ~ and - was not apparent when looking at the email update rather than the actual thread on GitHub!

@miketaylr
Copy link
Member

I think I did it successfully. It was confusing at first because the difference between ~ and - was not apparent when looking at the email update rather than the actual thread on GitHub!

Ah, yeah -- depending on the font I bet that could be confusing! I still see 2 commits. Are you sure you pushed the single commit with git push -f?

You can also check by logging out the last 2 commits and making sure yours is only the first one via something like git log -n 2.

@laghee
Copy link
Contributor Author

laghee commented Mar 22, 2017

I have a feeling I missed something with the push. It looks like I squashed it locally, but maybe I'm missing something fundamental in pushing? The git push command defaults to origin, right? So maybe I should have specifically done git push -f origin issues/1199/2?

screenshot 2017-03-22 22 01 23

@miketaylr
Copy link
Member

So maybe I should have specifically done git push -f origin issues/1199/2?

That looks about right. For me, my first push typically looks like git push --set-upstream origin issues/NNN/N/N, so git push -f will default to what i set the upstream to.

@laghee
Copy link
Contributor Author

laghee commented Mar 23, 2017

For me, my first push typically looks like git push --set-upstream origin issues/NNN/N/N, so git push -f will default to what i set the upstream to.

That sounds eminently sensible. I wish I had done that.

So, leery of making things worse, I nonetheless tried re-pushing to the correct branch. It looks like there's now only one commit on issues/1199/2, so that seems fixed, but I'm not entirely sure I didn't do something dopey beneath the hood. 🤞🏻 I apologize to be making your job harder!

@laghee
Copy link
Contributor Author

laghee commented Mar 24, 2017

Hi, @miketaylr, when you get a chance could you let me know if I managed to send the squashed commits correctly?

@denschub
Copy link
Member

denschub commented Mar 24, 2017

Looks great, there is only one little nag left: The commit message contains the same message ... twice! That's no big deal and we probably could edit that when merging (maybe Mike is doing that), but if you want, you can call git commit --amend and edit the commit message so it does not appear twice. After that, force-push again and you should be done!

Thanks for your patience. I know it can be confusing at first... :)

(jumping in since Mike is probably busy with some work traveling)

@miketaylr
Copy link
Member

@laghee yep -- it did work! \o/

Like @denschub said, could you tweak the commit message so it's not duplicated on different lines?

git commit --amend
(delete second line of commit message, save file)
git push -f (or whatever magic git command you just used to push the new commit!)

thx!

@laghee
Copy link
Contributor Author

laghee commented Mar 24, 2017

Thanks, @denschub and @miketaylr! I amended and pushed again. I appreciate all the hand-holding! 🤓

@miketaylr
Copy link
Member

Awesome! Thanks @laghee

@miketaylr miketaylr merged commit 669123e into webcompat:master Mar 27, 2017
@laghee laghee deleted the issues/1199/2 branch March 27, 2017 22:21
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