Closed X3Technology closed 5 years ago
@mathisjay - Looks like you are starting to get the hang of the git-flow here. One tweak I'd recommend is to create a new branch in your local repo for the issue being worked on. So in this case, it would have been a branch called issue-13
. Then you can push issue-13
to your forked (origin) repo and create a pull request from there to master
on the main DNNCommunity repo.
As the owner/steward/lead on this project, you certainly have the rights to self-merge pull requests, but it is always a good policy (especially when other maintainers/contributors are involved), to request a Review by at least one of them.
Hope you don't mind the Git/GitHub tips here. Since this lives within the DNNCommunity GitHub org, it is important we set a good example for others in the community. :)
Thanks! Keep the tips coming! Still learning over here 😊
One thing I was struggling with was how to get my origin fork to sync up with upstream before branching locally. But I think perhaps I just branch locally from upstream:master and then push that branch to origin and the PR from origin to master. Is that right?
From: David Poindexter notifications@github.com Sent: Thursday, July 18, 2019 9:35 AM To: DNNCommunity/Dnn.WebAnalytics Dnn.WebAnalytics@noreply.github.com Cc: Jay Mathis jmathis@x3technology.com; State change state_change@noreply.github.com Subject: Re: [DNNCommunity/Dnn.WebAnalytics] removes unecessary library references (#14)
Looks like you are starting to get the hang of the git-flow here. One tweak I'd recommend is to create a new branch in your local repo for the issue being worked on. So in this case, it would have been a branch called issue-13. Then you can push issue-13 to your forked (origin) repo and create a pull request from there to master on the main DNNCommunity repo.
As the owner/steward/lead on this project, you certainly have the rights to self-merge pull requests, but it is always a good policy (especially when other maintainers/contributors are involved), to request a Review by at least one of them.
Hope you don't mind the Git/GitHub tips here. Since this lives within the DNNCommunity GitHub org, it is important we set a good example for others in the community. :)
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHubhttps://github.com/DNNCommunity/Dnn.WebAnalytics/pull/14?email_source=notifications&email_token=AAMDENMHOQPR6OAIZSWB3KTQABWPDA5CNFSM4IE2VYTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2IPWPI#issuecomment-512817981, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAMDENPSRBXQE5X7KENE2YDQABWPDANCNFSM4IE2VYTA.
@mathisjay there are multiple ways people prefer to do this, but here is my flow every time I work on a new issue.
git checkout master
to switch to my local repo's master
branchgit branch
to list all branches currently on my local repogit branch -D <branch-name>
for any branches I want to deletegit pull upstream master
to make sure my local master
branch is in sync with the upstream master
branchgit push origin master' to make sure my forked (origin) GitHub
masterbranch is in sync with my local and upstream
master` branchesgit checkout -b issue-##
(in your case this would have been issue-13
) to copy my local master
branch into a new branch named issue-##
git add .
to stage all changes for local commit (by the way, a .
should not be used if you only want to stage a subset of files that were changed - for that you can use git add <file-name>
for each file you want to stage)git commit -m "a meaningful message about your commit"
to commit changes to your local repo (For the message, I typically use the title of the GitHub issue I am working on, as this really helps keep things nice and organized for repo owners/maintainers and makes it obvious what was done for the commit. For more complex issues, requiring multiple commits prior to submitting a pull request, I use more meaning messages related to each commit.)git push origin issue-##
(in your case this would have been issue-13
) to push your local repo branch to your forked (origin) GitHub repoResolves #issue-13
). This is important for repo owners/maintainers because this allows the referenced issue to be auto-closed upon merge of the pull request.There are certainly more complex scenarios that come up from time to time, but the above is a good general git-flow for most scenarios. I hope this helps!
Very helpful! Thanks!
From: David Poindexter notifications@github.com Sent: Thursday, July 18, 2019 10:07 AM To: DNNCommunity/Dnn.WebAnalytics Dnn.WebAnalytics@noreply.github.com Cc: Jay Mathis jmathis@x3technology.com; Mention mention@noreply.github.com Subject: Re: [DNNCommunity/Dnn.WebAnalytics] removes unecessary library references (#14)
@mathisjayhttps://github.com/mathisjay there are multiple ways people prefer to do this, but here is my flow every time I work on a new issue.
There are certainly more complex scenarios that come up from time to time, but the above is a good general git-flow for most scenarios. I hope this helps!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/DNNCommunity/Dnn.WebAnalytics/pull/14?email_source=notifications&email_token=AAMDENLFMANCMOJ2KJHG64LQAB2IXA5CNFSM4IE2VYTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2IS34I#issuecomment-512830961, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAMDENJ5EKK4PTSO2HX5DLTQAB2IXANCNFSM4IE2VYTA.
resolves #13