Streaming Music Web-server pt5

Streaming Music Web-server pt5

So before we get started with coding I need to make sure we have another tool in our toolbox to make the process more efficient.

So in a previous post I talked about Github, and by no means am I expert but Github is a great resource. Per Wikipedia:

GitHub, Inc. is an American multinational corporation that provides hosting for software development and version control using Git. It offers the distributed version control and source code management (SCM) functionality of Git, plus its own features. It provides access control and several collaboration features such as bug trackingfeature requests, task management, and wikis for every project.[4] Headquartered in California, it has been a subsidiary of Microsoft since 2018.[5]

The reason we are using GitHub is to backup our source code and provide a way to share it with others. So let’s hop right into it.

Since we are running a raspberry pi machine Git functionality is already installed! So the first thing we do is navigate to our web directory which should be /var/www/html.

So in your console type the following command:

git clone https://github.com/enealjr/Techrens-Music-Server.git

What the above command does is copy the master branch from GitHub to your local machine on the raspberry pi.

Next type the following command:

cd Techrens-Music-Server

This will put you in the directory of the code you can type ls to list the content of the directory.

So now type the following command:

git status

Your output should look like this:

This let us know we are currently on the master branch of our local machine and have the most up to date code. So for the next step I want to create a separate working branch of code to work with.

Type the following command:

git branch updateAudio

Now type the following command:

git branch

This should list all the branches you have, and in this case it should only be two like this:

Notice how there is a * in front of master and the text is in green. That informs you that you currently are on the master branch. So now we want to switch to the branch we just created.

Type the following command:

git checkout updateAudio

Now if you type the previous git branch command again your output should look like the following:

Note: I wrote this guide a while back and since then I had to rebuild my pi server so I need to get up to speed. With that being said for homework please review the following links:

Git Commands, Working with Git and common Git Commands

If you have any questions please post it in the comment section. I will not start moving forward with the project : )

Leave a Reply

Your email address will not be published. Required fields are marked *