<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr" class="gmail_attr" style="color:rgb(0,0,0)">On Thu, Jan 9, 2020 at 3:35 PM Gerben Wierda <<a href="mailto:gerben.wierda@rna.nl">gerben.wierda@rna.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="color:rgb(0,0,0);margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Given my absolute lack of decent git skills (and it’s just too complicated for a fast skill increase) I have the following setup (which so far worked)</div></blockquote><div><br></div><div>I'll add my 2 cents and echo that you should keep master pristine. I would even suggest you set 'origin' as the default remote to avoid accidentally pushing to your Github master.</div><div><br></div></div></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><span style="font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;font-style:inherit;font-variant-caps:inherit;white-space:inherit;color:rgb(36,39,41);font-size:13px;background-color:rgb(239,240,241)">$ git config branch.master.remote origin</span></div></div></div></div></blockquote><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><br></div><div>This way, assuming you don't have rights to the official MacPorts repo, you get a 403 error when running a <span style="font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;font-style:inherit;font-variant-caps:inherit;white-space:inherit;color:rgb(36,39,41);font-size:13px;background-color:rgb(239,240,241)">git push</span>. You also get the added benefit of pulling updates from the correct source with just a <span style="font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;font-style:inherit;font-variant-caps:inherit;white-space:inherit;color:rgb(36,39,41);font-size:13px;background-color:rgb(239,240,241)">git pull</span>.</div><div><br></div><div>All changes and commits from this point go to a branch. You should have one branch for each PR you plan to submit. When you are ready to create the PR, use <span style="font-size:13px;font-style:inherit;font-variant-caps:inherit;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;white-space:inherit;color:rgb(36,39,41);background-color:rgb(239,240,241)">git push -u local branch-name</span> to upload and set your Github repo as its default remote. After the PR is merged, run <span style="font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;font-style:inherit;font-variant-caps:inherit;white-space:inherit;color:rgb(36,39,41);font-size:13px;background-color:rgb(239,240,241)">git checkout master; git branch -D branch-name; git push local :branch-name</span> to clean up. This locally switches to your master branch, locally force-deletes your work branch, and deletes the work branch in your Github repo.</div><div><br></div><div>This is the workflow I use. It keeps my changes separate and helps me track my updates. I can also run a <span style="font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;font-style:inherit;font-variant-caps:inherit;white-space:inherit;color:rgb(36,39,41);font-size:13px;background-color:rgb(239,240,241)">port build</span> against my changes or the original Portfile just by checking out the appropriate branch.<br></div><div><br></div><div><br></div><div>Allan</div><div><div dir="ltr" class="gmail_signature"><div>-- </div>Allan Que<br><a href="mailto:allan.que@gmail.com" target="_blank">allan.que@gmail.com</a></div></div></div><br></div></div></div></div></div></div></div></div></div></div></div></div>