Skip to content

Code Organization/Concepts: Fixed a scoped variable collision in the las... #586

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

Closed
wants to merge 1 commit into from
Closed

Conversation

RedWolves
Copy link
Member

...t code example.

Ref #585

@arthurvr
Copy link
Member

Looks fine, but I'm wondering if it doesn't make things difficult for beginners.

@RedWolves
Copy link
Member Author

@arthurvr while the site does have a majority of beginner topics this is one of those topics that could be considered intermediate to advanced. With that said if you think there is a way to improve the example please open a new issue.

This PR fixes a broken code example so it works.

@gnarf I just realized while writing this comment that I submitted this on my new work computer which I think has my work email address configured. Do I need to sign the CLA with that new email address?

@gnarf
Copy link
Member

gnarf commented Dec 24, 2014

Or ammend your commit with --author to set it to the one you signed the CAA / CLA with

@RedWolves
Copy link
Member Author

That's a great tip for before I push ... but I pushed already. I'll close this PR and create a new one with the right author email.

@RedWolves RedWolves closed this Dec 24, 2014
@arthurvr
Copy link
Member

why? You could force push this one.

$ git checkout <right branch>
$ git commit --amend --author "<your info>"
$ git push -f

@scottgonzalez
Copy link
Member

You should also set your config for the individual repos so this doesn't happen again.

@RedWolves
Copy link
Member Author

I was wondering if you could do that...can you point me to some info on how to do that?

@scottgonzalez
Copy link
Member

can you point me to some info on how to do that?

See @arthurvr's comment: #586 (comment). Though I would warn against git push -f in general documentation without a remote and branch listed since you have no idea if the branch is set up to track or if the contributor might have push access to upstream and is just going through a fork for PRs.

@RedWolves
Copy link
Member Author

That just amends the commit not the individual repo like you suggested through right?

@arthurvr
Copy link
Member

To set another author.email in one specific repo I think you can just edit your .git/config.

@scottgonzalez
Copy link
Member

Correct. I would suggest:

git config user.name "<full name>"
git config user.email "<email address>"
git commit --amend --reset-author
git push -f <remote> issue-585

Though since you've already sent a new PR, just run the first two commands (or presumably just the email, since you don't need to change your name). You can repeat that for each repo that shouldn't use the info from your global git config.

@RedWolves
Copy link
Member Author

Seems like you can do it without using the global flag for just a single repo https://help.github.com/articles/setting-your-email-in-git/

@RedWolves
Copy link
Member Author

Well at least I learned something today. Thanks @arthurvr & @scottgonzalez

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

Successfully merging this pull request may close these issues.

4 participants