Dan Cole Posted April 19, 2015 Author Share Posted April 19, 2015 @@BrockleyJohn I'm having a quick look while on lunchbreak from bricklaying. They give you a lunch break? :P I see from your image that you uploaded, that you have some pulls pending....looking at the navbar it shows 3. That is probably all you need to do. I figured out how to add my Beyond Compare as a diff editor. Tools/Options/Diff....it is included in their dropdown list....I added it and then reloaded sourcetree. Now when I click the gear settings in the diff window and select external diff it loads the file into Beyond Compare...I can see the differences....edit it and simply save it back with the changes made...it's then ready for me to commit. I'm sure I have lots to learn yet but at this point it is starting to feel comfortable and no where near as hard as it seemed at first. Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
BrockleyJohn Posted April 19, 2015 Share Posted April 19, 2015 @@Dan Cole, I gave myself a lunch break (they're my bricks after all) and now the rest of the evening off. Anyway, those pulls brought down everything you'd done. But I don't want to just bitch and moan about your work, I want to collaborate, so I deleted the clone and forked you instead, did something almost useful ... as you know Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
Dan Cole Posted April 19, 2015 Author Share Posted April 19, 2015 @@BrockleyJohn Thanks John...you've been committed. :wacko: Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
Dan Cole Posted April 9, 2016 Author Share Posted April 9, 2016 I thought I'd bring this old thread up. I can't believe a year has gone by already. I have a project that I want to get up on Github so I can ready it to send to Gary for his consideration. As a result I'm back at this but I don't really remember much of what I learned a year ago...time to do a bit of dusting and sweeping up. Hopefully those of you who were participating in the thread are still around and have been experts by now. When I get home a few hours I'm going to try to... a. Create a master from the current responsive project...I assume it's EDGE. b. make a branch of the master c. move my branch to SourceTree d. add my changes to the SourceTree branch I presume I can then PUSH the changes back to Github and if I understand this correctly make a PULL REQUEST. Does this sound right to you wizards? Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
BrockleyJohn Posted April 9, 2016 Share Posted April 9, 2016 I thought I'd bring this old thread up. I can't believe a year has gone by already. I have a project that I want to get up on Github so I can ready it to send to Gary for his consideration. As a result I'm back at this but I don't really remember much of what I learned a year ago...time to do a bit of dusting and sweeping up. Hopefully those of you who were participating in the thread are still around and have been experts by now. When I get home a few hours I'm going to try to... a. Create a master from the current responsive project...I assume it's EDGE. b. make a branch of the master c. move my branch to SourceTree d. add my changes to the SourceTree branch I presume I can then PUSH the changes back to Github and if I understand this correctly make a PULL REQUEST. Does this sound right to you wizards? Dan Yeah, kinda... Make a Fork of Gary's repo (the big fork button). If you've already got a fork, it'll take you straight to that. You can't have more than one fork which can feed pull requests back to Gary's. My next step would be - in source tree hit clone/new and set the remote to your fork above. Then I just create the branch in source tree, do changes and commits there. The commits will push to your fork. When you've finished developing and testing, make sure everything's committed and pushed to your fork, then in github you create the pull request. Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
Dan Cole Posted April 10, 2016 Author Share Posted April 10, 2016 @@BrockleyJohn Hi John...thanks for jumping in. I followed your directions...forked Garys repo, cloned it in SourceTree and then created a branch to work on. Now I'm not sure what is the best way to update/change my branch? Do you have any pointers in that regard? I tried a little test edit and while it didn't seem to work...when I opened SourceTree a second time there it was so I think I'm good with that too. I basically opened the file list using Explorer, clicked on the file I want to edit...it opened in NotePad++, the editor I like to use...did the edit and saved the file. When I looked at SourceTree to see what if anything changed, I couldn't see that anything did but when I closed it and reopened it...there was my change in all it glory. :D I probably need to see if there is a refresh button. I'll work on my edits now and then try the last steps you outlined...is it really this easy? Any tips on editing the files? Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
Dan Cole Posted April 10, 2016 Author Share Posted April 10, 2016 @@BrockleyJohn Wow...I'm impressed....since I had the changes I wanted to move to Github on my test server I used FileZilla to download them to my branch location and guess what....everything showed up nicely in Sourcetree...I still need to find that update button though. Can it really be that easy? Next up...getting the updated branch on Github. Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
BrockleyJohn Posted April 10, 2016 Share Posted April 10, 2016 @@Dan Cole my sourcetree is set to refresh automatically (settings / advanced - it's a setting per repo) though it's not always instant depending on how many dozens of windows I have open... Manual refresh is second item on repo menu or shift + alt + R There's also a global refresh in the background setting in Tools / Options Maybe I was lucky because my install defaulted to all these on and I've never had to set them. Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
BrockleyJohn Posted April 10, 2016 Share Posted April 10, 2016 On the next step - make sure the push to origin check flag is set when you do the commit and that sends it to github. IIRC it doesn't do this from here if you've never pushed this branch before and it doesn't exist on github Otherwise, just hit push and in the list of branches that comes up make sure your change branch is set to push - maybe you could call the one on github something different or push to a different branch here, but I never tried it; seems like a recipe for confusion. Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
Dan Cole Posted April 10, 2016 Author Share Posted April 10, 2016 @@Dan Cole my sourcetree is set to refresh automatically (settings / advanced - it's a setting per repo) though it's not always instant depending on how many dozens of windows I have open... Manual refresh is second item on repo menu or shift + alt + R There's also a global refresh in the background setting in Tools / Options Maybe I was lucky because my install defaulted to all these on and I've never had to set them. @@BrockleyJohn It looks like you can refresh both the local SourceTree view F5 and your repo as you mentioned above. I see that I also have the global refresh set. Hopefully things will be a bit more obvious when I do my next set of changes. Thanks John... Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
Dan Cole Posted April 10, 2016 Author Share Posted April 10, 2016 On the next step - make sure the push to origin check flag is set when you do the commit and that sends it to github. IIRC it doesn't do this from here if you've never pushed this branch before and it doesn't exist on github Otherwise, just hit push and in the list of branches that comes up make sure your change branch is set to push - maybe you could call the one on github something different or push to a different branch here, but I never tried it; seems like a recipe for confusion. @@BrockleyJohn John...I think I get this but just to clarify...when I created my branch in SourceTree I gave the new branch the name shopping_cart_updates (the project I'm working on) and made my changes to that branch. I then pushed those changes to my Github repo and when I did that I had the option to select that branch or my master...I chose the shopping_cart branch and it created a branch by that name in my Github repo. Is that right? Tonight I hope to make a couple of final changes to the branch in SourceTree and at that point I assume when I do the push to my Github it will simply update the shopping_cart branch, adding to it...which is what I want. Is that correct or do I need to delete the branch on Github and start the Github branch all over? I guess I'll find out but if you have any suggestion on how to do that correctly I would appreciate it. I'm also wondering if it is possible to lock the master so I don't get stupid some day and make the mistake of updating it. Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
Dan Cole Posted April 10, 2016 Author Share Posted April 10, 2016 John...if it helps you or anyone else following along, my Github repo can be found here... https://github.com/MOPS-DanCole/Responsive-osCommerce Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
BrockleyJohn Posted April 10, 2016 Share Posted April 10, 2016 @@BrockleyJohn John...I think I get this but just to clarify...when I created my branch in SourceTree I gave the new branch the name shopping_cart_updates (the project I'm working on) and made my changes to that branch. I then pushed those changes to my Github repo and when I did that I had the option to select that branch or my master...I chose the shopping_cart branch and it created a branch by that name in my Github repo. Is that right? Tonight I hope to make a couple of final changes to the branch in SourceTree and at that point I assume when I do the push to my Github it will simply update the shopping_cart branch, adding to it...which is what I want. Is that correct or do I need to delete the branch on Github and start the Github branch all over? I guess I'll find out but if you have any suggestion on how to do that correctly I would appreciate it. I'm also wondering if it is possible to lock the master so I don't get stupid some day and make the mistake of updating it. Dan @@Dan Cole that's spot on. Once you've done that first push of the new branch there's not too much danger of putting it anywhere else... I think there's a bigger risk of having the wrong branch selected in sourcetree when you do a bugfix so you change the master by mistake and then not noticing before committing. I gave @@piernas some commands to untangle that: http://www.oscommerce.com/forums/topic/409255-githubs-nightmare-need-some-help-here/?p=1741500 Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
Dan Cole Posted April 11, 2016 Author Share Posted April 11, 2016 @@BrockleyJohn My question for today...I made a few more changes to my shopping_cart branch...I committed them and then did the push. When I went to do the push it wanted to know which branches I want it pushed to and both my master and shopping_cart were ticked....I unticked the master since it is my understanding that I should never update my master...is that correct?I guess I have a second question too...when I look at the push on Github, it looks like it shows up as a separate commit from the one I did previously. If I now what to do a pull request do I have to send the requests separately or is there a way to merge the two commits and do one pull request to keep it for the person I'm making the pull request to?I just noticed a merge button in SourceTree should I have used that? Dan PS: If anyone else knows the answers to these questions please feel free to jump. I don't want to wear John out. :rolleyes: Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
BrockleyJohn Posted April 11, 2016 Share Posted April 11, 2016 @@BrockleyJohn My question for today...I made a few more changes to my shopping_cart branch...I committed them and then did the push. When I went to do the push it wanted to know which branches I want it pushed to and both my master and shopping_cart were ticked....I unticked the master since it is my understanding that I should never update my master...is that correct? I guess I have a second question too...when I look at the push on Github, it looks like it shows up as a separate commit from the one I did previously. If I now what to do a pull request do I have to send the requests separately or is there a way to merge the two commits and do one pull request to keep it for the person I'm making the pull request to? I just noticed a merge button in SourceTree should I have used that? Dan PS: If anyone else knows the answers to these questions please feel free to jump. I don't want to wear John out. :rolleyes: Actually, pushing branches that haven't changed doesn't do anything; it's only the change that are pushed. There doesn't seem to be much overhead in including the branches that haven't changed. My fork has loads of branches because of all the addons and I generally push all of them without any noticeable delay. Also - it only pushes commits, so you have to have made the mistake of committing changes to your local master before you can do any harm to your remote one. However, if you prefer the belt-and-braces approach then go ahead and uncheck it; you're semantically correct. When you do a pull request it pulls all the changes between your branch and the target of the pull - however many commits there are. Multiple commits aren't a problem. Merge is for (re)combining two branches. Never merge into master! The sort of circumstance you might use it is this: - you have an ongoing branch which is your live store (eg. production) - you want to do a bit of work, small bugfix or big project so you create a branch of production: "project x" - you do your work on project x, test it and put it live. Then you merge project x branch into production branch and probably delete it unless you want easily to refer back to it for some reason. Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
Dan Cole Posted April 11, 2016 Author Share Posted April 11, 2016 @@BrockleyJohn Thanks John...that takes a bit of the worry out of it....hopefully when I do the pull request I'll be able to see what it looks like on the other end...that should clear up some of my confusion. I appreciate all your help....I feel a whole lot better about using SourceTree and Github now. It is not as scary as it seemed. Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
Dan Cole Posted April 14, 2016 Author Share Posted April 14, 2016 Is it just me? Does Github make you feel stupid? I know I'm not the sharpest tool in the shed but why is it that I feel so dumb whenever I use Github. Things that you think that would be really simple, are just not intuitive at all...at least not to me. I just went to update my master and I couldn't believe the hoops I had to jump though...I ended up watching 4 youtube videos before managing to do so...and I'm still not sure that I did it right. Someone must work really hard at making it difficult to use. Would an update button be to much to ask for? Aaarrrggghhhhhh.... :wacko: Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
greasemonkey Posted April 14, 2016 Share Posted April 14, 2016 @@Dan Cole I've been right where you are... And unfortunately for me I just couldn't wrap my head around it. Don't want to sound like a downer - but I just couldn't get it. Link to comment Share on other sites More sharing options...
♥altoid Posted April 14, 2016 Share Posted April 14, 2016 @@Dan Cole Do you mean bringing your fork up to where Gary has Edge? I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are. Link to comment Share on other sites More sharing options...
Dan Cole Posted April 14, 2016 Author Share Posted April 14, 2016 @@Dan Cole Do you mean bringing your fork up to where Gary has Edge? Yes....that is probably the proper way to say it. Hopefully I didn't mess it up. Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
Dan Cole Posted April 14, 2016 Author Share Posted April 14, 2016 @@Dan Cole I've been right where you are... And unfortunately for me I just couldn't wrap my head around it. Don't want to sound like a downer - but I just couldn't get it. @@greasemonkey Give it another shot Scott....it will really help in maintaining and updating your coding projects and enable you to contribute to the community build. There is no doubt that it is a lot more difficult/complicated then it should be but if we persist I'm sure we'll come to understand it at some point. The penny will fall some day. There are also excellent guys watching this thread and helping out where they can and who have been through the same learning curve. There is probably no better opportunity to learn how to use it then there is now. Besides I need someone to share in my pain. :x Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
piernas Posted April 14, 2016 Share Posted April 14, 2016 @@Dan Cole github workflow is hard to understand.for me too. Many simple tasks must be done in the git commandline when the web interface could easily handle them. I'm starting to caatch it after a few weeks. Btw you pushed commits to gary's master branch. Is that what you wanted??? Link to comment Share on other sites More sharing options...
BrockleyJohn Posted April 14, 2016 Share Posted April 14, 2016 @@Dan Cole - trying to get the latest of Gary's master through github is unbelievably complicated but it's pretty easy in sourcetree. If it's the first time you've done this way, add gburton/Responsive-osCommerce as an additional remote - menu Repository / Add remote Next time, Fetch (all) to make sure you've got the latest view of it. Choose the option that prunes remote tracking branches or you'll eventually see a huge list of all the old change branches). Make the master branch in your local repo your current branch - it will go bold in the list of branches NOW CHECK YOU HAVE NO UNCOMMITTED CHANGES - if you have, go back to your working branch and commit them, or else stash them instead. Go down to the remote of Gary's repo at the bottom of your list, open up the list of branches and right click on his master Now the scarey bit: choose pull into current branch. On the dialog box, keep the first option checked that commits automatically but leave the rest unchecked. Once you've done that you'll have a bunch of commits to push to your origin, because your sourcetree master is up to date but your github master hasn't changed, so push them. If you're nervous here, you can go back to github and see how many commits it says you're behind gburton:master. This should be the same as the number you're pushing. Wah-hay! Magic! Github now says 'This branch is even with gburton:master.' Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
♥altoid Posted April 14, 2016 Share Posted April 14, 2016 I do things a bit differently keeping Github up to snuff with whatever then pull into Sourcetree. Just now I am working on catching up with Dan's latest commit sooooooo, in Github I do this: 1) Get on the page for my Fork of Edge...shows this at top: skleiner/Responsive-osCommerce 2) Click new pull request. Top of page will now show: gburton/Responsive-osCommerce 3) Below that where it says Comparing Changes I fiddle with the forks so on the left I have the fork and branch I want to pull into And on the right I have the fork and branch I want to pull from. So in this case (after fiddling) it shows my fork / branch on the left and dan's fork and branch on the right Tip: I start with the right side (pull from) first before setting up the left (pull into) 4) Upon successful fiddling, getting your to and from correct, you will see Create Pull Request, CLICK THAT 5)You can enter comments..but scroll down, see CREATE PULL REQUEST and click that You should now see: This branch has no conflicts with the base branch Merging can be performed automatically. 6) Look for Merge Pull Request, click that, then when CONFIRM MERGE appears click that And done. Page will now say: Merged skleiner merged 1 commit into skleiner:shopping_cart_modules from MOPS-DanCole:Shopping_Cart_Update just now This works for me for what I need to pull into and pull from. I use the same procedure for keeping up with edge. Takes me about a minute to run through the above. I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are. Link to comment Share on other sites More sharing options...
Dan Cole Posted April 14, 2016 Author Share Posted April 14, 2016 @@Dan Cole github workflow is hard to understand.for me too. Many simple tasks must be done in the git commandline when the web interface could easily handle them. I'm starting to caatch it after a few weeks. Btw you pushed commits to gary's master branch. Is that what you wanted??? I hope not....I wanted to update my master or as Steve says update my fork. You weren't looking at the shopping cart commits by any chance were you...I did do a pull request on a couple of those a few days ago? Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.