Anyone fancy imparting some Git knowledge?

50 views
Skip to first unread message

Paul Gardner

unread,
Feb 17, 2016, 12:11:17 PM2/17/16
to PHPNE
Hi,

Looking for a 'Git Mentor' to help me get to grips with how to best make it part of my workflow, including deployment.

I understand the fundamentals, but haven't got much further than that and really need to start versioning my code, including managing git repos within repos, and submodules etc.

Open to any suggestions to help me move forward.

Thanks in advance, 

Paul.

Alex Moon

unread,
Feb 23, 2016, 2:28:55 PM2/23/16
to PHPNE
Hey Paul,

I usually lurk a bit on boards like these before I post anything but I notice you've not had any answers yet, so I thought I might chip in.

I've been using git professionally for five or six years. It's a brilliant piece of software but it's really only good at version control. It sounds like you might want it to do more than it's good at.

I've used git submodules and it was a bit useless every time. Dependencies are better managed with composer (in PHP) or pip (in Python). Deployment meanwhile I've done with git as well, though only in the form of a pull on the server side. Again, much better handled by fabric (or docker if you're into that).

Nevertheless I'd be more than happy to impart a bit of git-fu if you've got any questions. It's got a lot of power under the hood and can generally do a lot more than you think.

If you ever want to get in touch directly you can get me at this address, however if you post a few more specifics here I'm sure you'll find more git experts watching.

Alex

Paul Gardner

unread,
Feb 24, 2016, 6:32:44 AM2/24/16
to PHPNE
Alex,

Thanks for chipping in, I've had one person private message me so it's not been a total washout :)

Yeah, I really only need to use GIT for version control, but mentioned deployment as it's another related procedure that I need in place sooner rather than later.  In the past, I have played with GIT, BitBucket and deployment (triggered pulls) with mixed results.  

The guy who PM'd me echoed your comments about submodules and also recommended composer, another tool that's been on my 'to learn' list for a while.

My situation is, I worked for 10+ years as a self-taught freelance full-stack web developer, mainly working alone on small to medium sized project.  Versioning, deployment, unit testing have been on my radar for 6 years or so, but I prioritised completing each project and moving onto the next one.

CakePHP and Croogo introduced me to OpenSource and GitHub.  I created some public repos (infrequently maintained) and made some basic contributions to Croogo (mainly through the web interface). 

As such, I know enough about GIT to understand I should learn a lot more before I can put it to proper use, especially as I'm now the senior developer at an agency and we're about to start employing other developers.

If you're open to meeting some time, the drinks would certainly be on me :)

Thanks, Paul.

Robin Scott

unread,
Feb 24, 2016, 10:55:16 AM2/24/16
to php-nor...@googlegroups.com

Hi,

Interesting to read this as I've recently plunged into github for a project working with open source guys, having used SVN for version control for a lot of years.

From what I can see, github's primary power and reason for being is collaboration and version control.

If you're building a team and looking for a versioning tool to use with this team, it will do the job very well.

For the rest, I've very limited experience!

I would also be interested if there are any good "making the most of git" resources that anyone knows of.

As an aside, lots of people use it to check out developers for hiring purposes. Including me.

Regards,

Rob

--
You received this message because you are subscribed to the Google Groups "PHPNE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-north-eas...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

oli wood

unread,
Feb 24, 2016, 11:50:04 AM2/24/16
to php-nor...@googlegroups.com

I'm running a session for a local college about getting up and running with git and github. Would you like me to pass on the slide deck? It's a very practical session but it might be a good starting place. Atlassians articles are very good too.
Oli

Jason Judge

unread,
Feb 24, 2016, 11:54:39 AM2/24/16
to PHPNE

Paul,

I have found this article helps to link some of the commands with with is happening in a visual way, and is well work a read, and downloading the PDF to keep handy:

http://nvie.com/posts/a-successful-git-branching-model/

You probably won't need to work with all the branches that it describes immediately, but just understanding how they work, what they mean, and how and when you would use them, is pretty much vital to making best use of git.

The official git documentation is generally no much better than code comments left by the developer and to be read only by the developer, IMO, but Stack Overflow is a great source of help, as people explain git in a lot of detail there. I have also found that you should not read all the instructions and guides literally - there is no standard in how the example commands are presented, so for example when one gives "origin" as a parameter, you need to read between the lines to tell if it means "an origin", "your origin", "a remote origin" or the literal word "origin" (but only given certain conditions in the way your repository was set up). That has always been the biggest source of confusion IMO. There are conventions, and conventions, and everyone assumes you are using their conventions, and forget just how flexible git is, and how many different ways it can be set up and used, and that is where the diagrams in the link above really help to put it into context.

You can use git simply, not much differently to SVN, but that is not where git thrives. Get your head around the concepts, and it gets easier, but don't expect to be an expert - it's a rabbit hole that goes waaay deep. I hope that helps!

-- Jason

Sam Lambert

unread,
Feb 24, 2016, 12:01:45 PM2/24/16
to php-nor...@googlegroups.com
Some resources that might be useful to you:


Honestly though you don't need to know much git to get a lot done. It is is fairly simple for most use cases. Picking a good workflow is probably more important than an advanced git knowledge. My vote is for the simple branch from master and merge back in via pull request.

Jason Judge

unread,
Feb 24, 2016, 12:03:24 PM2/24/16
to PHPNE


On Wednesday, 24 February 2016 16:50:04 UTC, oli wood wrote:

I'm running a session for a local college about getting up and running with git and github. Would you like me to pass on the slide deck? It's a very practical session but it might be a good starting place. Atlassians articles are very good too.
Oli


Hi Oli,

Would it be cheeky of me to join the queue for a peek of this slide deck? I'm pretty much okay with git, but never got to the stage where the commands feel intuitive when trying to do anything.

-- JJ

oli wood

unread,
Feb 24, 2016, 12:11:02 PM2/24/16
to php-nor...@googlegroups.com

No problem, I'll sling it on speakerdeck when I'm done. Better write it first

--

Paul Gardner

unread,
Feb 24, 2016, 12:15:25 PM2/24/16
to PHPNE
Thanks for all the advice, links and offer of a slide stack ...

Picking a good workflow is probably more important than an advanced git knowledge. My vote is for the simple branch from master and merge back in via pull request.

This is the bit I really want help with.  I was hoping to meet up with someone knowledgable to show them how I currently work, so they could advise on a workflow I could follow.  I much prefer learning by doing than taking on board a lot of theory, hence why I'm trying to bribe someone with free drinks if they can talk me through this :)

The main complication with the code base I am working with is it includes a couple of repos and I'm having to make modifications to the core of an external repo, but still wanting to be able to pull and merge updates from that repo's main branch when available.  

I contacted github as I know they use to have a base in Campus North) to ask if they offer 1-2-1 training, but they don't do this in the UK now.  They did send me a link to this though, anyone tried it?

Sam Lambert

unread,
Feb 24, 2016, 12:19:57 PM2/24/16
to php-nor...@googlegroups.com
https://guides.github.com/introduction/flow/ will tell you about GitHub flow. There are also useful training videos at https://www.youtube.com/user/GitHubGuides.

The base at Campus North was me but I no longer live in Newcastle.

--
You received this message because you are subscribed to the Google Groups "PHPNE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-north-eas...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Anthony Sterling

unread,
Feb 24, 2016, 12:34:45 PM2/24/16
to php-nor...@googlegroups.com
You lot are great. 😊

This message was sent from a mobile device, please accept my apologies for a terse reply and/or any spelling mistakes.

Paul Gardner

unread,
Feb 29, 2016, 8:25:24 AM2/29/16
to PHPNE
Hi Sam, thought the name rang a bell ... I will start working through those guides and ask any specific questions as I hit them.  

Do you know if there is a major content difference between those and the https://learn.wheelhouse.io/ course?

I contacted Campus North about you guys as they still have you on the website as residents.  They said they needed to update their site, but have not done so yet :) 
Reply all
Reply to author
Forward
0 new messages