Github Newbie - very basic questions probably!

Hi, I’m new to github but I think I’ve figured out the basics. But I’ve read so many tutorials they’ve all merged and confused me, and I’d just like someone to tell me if what I’m doing is right!

I’ve been asked to show I can code PHP by creating a plugin for a particular repository. I’ve created my github account, installed git on my personal computer, and cloned my fork of the repository I’m interested in to my /var/www/html folder on my local machine so I can work on it.

Once I’ve worked on the files I think I’ve to add/stage them and then push them to my personal github fork of the initial repository.

So question 1 is: is that all correct, and if so, how can I share my code changes with the person I’m doing this for?

Question 2 is: there’s never any mention of databases in the tutorials I’ve read. The repository I’ve forked and cloned has an installer which populates a database you create, but what if you need to make database changes? Is there usually a separate database repository? How does that work?


1 Like

If I make a pull request though, will this plugin I’m making (which I assume isn’t all that useful, just a demonstration of my abilities) not be viewable by anyone? Is there a way to just share with a particular person - like by emailing them a link or something? If you were an employer, what would you be expecting back from me?

No, actually I think I’m the one who’s confused. The code base I’ve been asked to make the plugin for is a public repository, I’ve forked that, so I guess it’s also a public repository? When I view my repositories on github I can’t see anywhere that it’s private (can’t see that is says public either though!).

Got it. Then yeah, you can probably just send a link to your repo.

Sorry for the confusion.

Any ideas about Qu2?

Databases are pretty much never version-controlled. The scripts that populate the database are likely in git, but the content of the database is not.

So, whats needed to create the database that the initial repository code uses will be in the repository, but if I need to create a new column in a table or a new table, how is that managed?