Github – learning basic setup and use
I have downloaded a lot of stuff from Github but haven’t really bothered figuring what it was about.
I found this video a simple way to get my head around it and get to use it initially:
Github Tutorial For Beginners – Github Basics for Mac or Windows & Source Control Basics
I had signed up to an account previously ( only realising when I tried to make a new account of the same name).
I downloaded the windows 64 bit version of the desktop app.
After creating a new blank ” repository” called PanoramaHTML in my Github account as per the video with a ReadMe.md file created.
I created a new directory called github in my downloads directory (my area of working) and then created a subdirectory called PanoramaHTML.
Then went to that directory and tried to use the command as per the video:
\Downloads\_Github\PanoramaHTML1>git clone https://github.com/drakemax/PanoramaHTML.git
It didn’t work. In the command console windows did not recognise the “git” command.
So back to Mr Google & StackOverflow where I found this article. It pointed to using this software” Git for Windows” . I downloaded that software (slow to start up the .exe file) and it works fine, so I can now use git on the command line as per the video.
So, after getting git to work on the command prompt I redid the command:
\Downloads\_Github\>git clone https://github.com/drakemax/PanoramaHTML.git
I only went to the main directory:
\Downloads\_Github\>
To run the command. The clone command creates/adds the subdirectory:
/PanoramaHTML
on my computer. So that is easy, no need to create a directory for where you want it to be.
After setting up the directory on my computer I proceeded to place all the files in there that I wanted and also updated the README.md file to explain what files are in there and how to use them.
As I had updated the files on my computer, I need to change directory using
\Downloads\_Github\> cd PanoramaHTML
\Downloads\_Github\PanoramaHTML\>
Once directory changed, I needed to add the files to the git repository, as I’d added folders and files and updated the readme.md file, so
\Downloads\_Github\PanoramaHTML\> git add -A (this adds all file contents to the index)
Then I needed to Record changes to the repository using the commit command so:
\Downloads\_Github\PanoramaHTML\> git commit -m “Folders and files added to directory and Readme file updated”
Then I can push the files up to GITHUB with:
\Downloads\_Github\PanoramaHTML\> git push
To check if they are the same (local git on computer and one at github :
\Downloads\_Github\PanoramaHTML>git status
On branch master
Your branch is up to date with ‘origin/master’.
So that is great.
I can now use the clone/download button to copy the link to share it with others:
https://github.com/drakemax/PanoramaHTML.git