Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SourceTree and GitHub Leader needed


Dan Cole

Recommended Posts

Thanks guys...it is nice to know it is not just me.  Me thinks they need a redesign.

 

I'm pretty sure I stepped through the process described by Steve....I followed a few videos including one from Gary.  The problem with the videos I found is they just walked you though it by route...I really didn't have an understanding of why I was doing what I was doing. Steve;s note looks helpful in that regard.  In the end I think I managed to update my fork but I'm just not positive.  It said I was 4 commits behind and then I think at the end I was 1 ahead so that really confused me.  My fingers are crossed.    I think I'll stick with the process described by Steve....at least I have a rough idea of how to do it. 

 

Once again thanks for taking the time to post and help this Gifhub challenged Canadian. :thumbsup:

 

Dan

Link to comment
Share on other sites

  • Replies 106
  • Created
  • Last Reply

Your 1 ahead is your pull...from my master into yours...

 

That looks like the commit as the result of his pull.  I get those with every update.  I think it's normal as it applies to just that fork.

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

Your 1 ahead is your pull...from my master into yours...

 

That thought went through my head along with a lot of other, not so nice things, that I can't type here. :rolleyes:

 

Dan

Link to comment
Share on other sites

That sorta thing goes through my head regularly lol :thumbsup:

 

They're usually coming out of my mouth too - good thing I'm not often doing it in a shared office! ...why I now go via sourcetree instead - 3 simple steps each of which makes sense.

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

Here is a look at my SourceTree....I assume it's a visual of my being 1 ahead of my master. (w00t)

 

To you Github wizards...does it look okay?  What does the pink mean?

 

post-182953-0-68941100-1460728199_thumb.jpg

 

Dan

Link to comment
Share on other sites

@@Dan Cole What branch are you on in SourceTree?

 

Regarding being ahead, in Github anyway, that's the product of your pulling updates.

 

Mine shows:  This branch is 38 commits ahead of gburton:master.

 

Look to the right, click Compare.  You'll see all the commits for updates.  I have 38 of them.  Make sense?

 

Regarding the colors, etc:  From somebody at Atlassian:

 

 

Nodes ARE commits, and the lines kind of represent branches. It might be more accurate to say that they show parent/child relationships between commits, but these relationships occur within branches. The labels are branches and tags. In the case of branches, the label shows up on the "HEAD" commit of that branch.

This one has been asked repeatedly (123), which is why I suggested searching for yourself: The colors of the lines are a visual aid only. In a project like mine, which has 8 or more lines if you go back just a week, the color coding is essential to tracing the connections between commits.

The grey boxes with up or down arrows are telling you the number of commits different between your local branch and a tracked remote branch. An up arrow means you have commits you need to push, a down arrow means the remote has commits you need to pull. If a branch has both, you will need to pull first, then push. Run a Fetch to update those counters.

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

@@altoid

 

In the image I posted it is showing all branches....which in my case is 2...the shopping_cart branch and my master.  The visual seems to match what I would expect to see it look like.

 

Regarding being ahead or behind I get it.  It was just a bit confusing doing one merge and seeing the number change like that...I guess I was expecting to see it change by one since I didn't realize I was merging all outstanding commits on the particular branch.

 

Thanks again Steve.

 

Dan

Link to comment
Share on other sites

@@Dan Cole If you switch branches in Sourcetree, the view will change.  Switch branches around there in Sourcetree, or load up one of Gary's branches from Edge and you should see that happening.  If you experiment with that and watch what's happening with the visual you may get a better handle on what's being shown there.

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

@@altoid @@BrockleyJohn  Steve, John or anyone else who might know...

 

When I'm doing a push from within SourceTree there is a little box to the right of the remote branch name, called Track?  Any idea what that does?  I was going to try it but thought it wiser to ask first...I get into enough trouble in Github without trying. :(

 

Dan

Link to comment
Share on other sites

@@altoid @@BrockleyJohn  Steve, John or anyone else who might know...

 

When I'm doing a push from within SourceTree there is a little box to the right of the remote branch name, called Track?  Any idea what that does?  I was going to try it but thought it wiser to ask first...I get into enough trouble in Github without trying. :(

 

Dan

Dan, maybe John will have a handle on this. I have not yet pushed anything yet.  That being said, in Sourcetree I am given the option at times to "track" whatever I am doing and I accept that. Doing so in the idea that tracking means Githup "tracks" what's going on then.

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

@@altoid Steve I found out what the options do but I still don't know what tracking actually does....I'm off to google for more.

 

Checked = Set the remote branch to be the one the local branch should track

Unchecked = Stop the local branch tracking anything

Mixed (-) = Don't change any tracking on this branch, leave it as-is

The latter is the default so that you can push ad-hoc to different remotes / branches from a local branch and not change the tracking setup (neither setting it to a new branch, or unsetting it to stop tracking)

 

 

Dan

Link to comment
Share on other sites

Tracking is all about keeping up with the changes (commits, actually) in another branch.

There are two different kinds of situations when you're taking changes from one branch into another. It might be a one-off, eg. to get the work of a project moved into your shop branch, to get the code of an addon, and so on. It might also be a situation where one branch is supposed to be a copy of another (like the branches in your github fork and your sourcetree clone). In the latter type they are tracking branches - or remote tracking branches, depending exactly where they are.

 

I think that in practice, in sourcetree, when talking about pushing/pulling between your local clone and your github fork, that setting only matters the first time you do a push and it creates the branch. If you started work by creating your new branch in sourcetree, when you push you'll  have to tell it where in your github repo to target the push. You will tell it to push to a branch of the same name, with tracking set to yes. If you started by making your branch in github I'd guess you never need to think about it at all (don't know for sure, I always create new branches in sourcetree).

 

Bottom line: nearly always for you, when pushing/ pulling a new branch, set tracking to yes.

The rest of the time: don't worry.

 

I expect that if you didn't set it to be a tracking branch the first time you pushed/pulled, you may need to tell it where to put the changes each time or they don't go at all.

 

Here's all about tracking branches in somewhat more detail than you're going to want: http://www.gitguys.com/topics/tracking-branches-and-remote-tracking-branches/

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

@@BrockleyJohn  Thanks again John....on my last commit I set the tracking on in SourceTree but didn't notice anything different.  I assume it was probably set when I created the branch so I'm not surprised.....next time I create a branch I'll look at it a little more closely.

 

Dan

Link to comment
Share on other sites

  • 3 weeks later...

Time to learn something new.   I saw Matt's edit language files module and figured I'd have a look.  I can see his files on Github and I suspect that I need to move them to my Git repo so I can then pull them into SourceTree but I have no clue as to how to go about this.  Can someone point me in the right direction?

 

Dan

Link to comment
Share on other sites

Make a new branch in your fork of edge. Pull Matt's branch into the branch you Just made.

In sourcetree, is there a separate remote for your edge fork?

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

I was able to create the new branch but I can't seem to figure out how to pull Matt's branch into it.   FWIW...I jumped ahead and can see the remote/branch in SourceTree...I guess I just need to add Matt's branch some how? 

 

Dan

Link to comment
Share on other sites

I think I got it.   I see Matt's files in SourceTree.   I need to have a closer look but I think I'm okay...well...with this anyway. :)

 

Dan

Link to comment
Share on other sites

@@Dan Cole glad you're there. There's no need to do anything on github; you can keep it simple by just adding the repo you're interested in as another remote (of your fork) inside Sourcetree, create your new branch and pull into it.

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

@@BrockleyJohn @@altoid

@@Dan Cole glad you're there. There's no need to do anything on github; you can keep it simple by just adding the repo you're interested in as another remote (of your fork) inside Sourcetree, create your new branch and pull into it.

 

Thanks John and Steve. 

 

I guess I shouldn't be surprised that there would be an easier way.   I usually learn about that after I've done something the hard way.  (w00t) 

 

I took a closer look at my new branch (Matts language editor) and I see there are lots of commits in it....it looks like it includes all the updates to EDGE as well as Matt's work so now I'm wondering if I did it right or if that is the way it should look?

 

If it is correct I'm wondering if it is possible to only update my branch with the commit related to the Language Editor or do I need to copy those files over to my branch?  ie Can I cherry pick?

 

Dan

Link to comment
Share on other sites

@@Dan Cole I tried the method outline by John and was able to get access to Matt's branch that way.  Different means to the same goal. It would be what you prefer I guess, one way or the other.  Anyway....it's nice to have options.

 

Going about this the way I noted above, first in Github, then in Sourcetree, Matt's branch is part of my fork now in the remote.  

 

what I did is double click Matts branch that has the language file work .  And in doing that a new local branch is checked out (pop up window with options first) and will now show above where the local working branches are listed above.  With Matt's branch now showing in my new local branch I have access to the commit.  

 

On the right, the language file commit shows at the very top of all the other commits. That top one has just the files that are related to the fork Matt has worked on.  So I simply highlight Matt's commit and now I see and access the pertinent files that are interested in this situation.

 

The beauty of it is if I activate (double click) the master branch, Sourcetree takes everything to that branch, Matt's branch work disappears, and that's that.  Switching back is a matter of double clicking again.

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

@@altoid  Steve try this...

 

Cole's Notes:

 

How to cherry pick a commit using SourceTree.  This assumes that you have already created the branch containing the commit you want to cherry pick and pulled it into SourceTree.

1. Check out the branch you want to add the commit to.

2. Display all branches within the main window...find the commit you want to cherry pick.  After selecting it...right mouse click and select the Cherry Pick option. It is now added to the branch you checked out in step 1 above.

How nice is that?
 

Dan

Link to comment
Share on other sites

@@Dan Cole That's good information.  I can't wait to check it out.  (w00t)

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...