GitHub

GitHub is a cloud based Git repository hosting service.  

Push Git project to GitHub


git status
git init
git add .

git add . will take a snapshot of all files & folders in the current folder.   The snapshot is stored in a temporary staging area Git calls "index".   Permanently store the contents of the index in the repository with the git commit command.  


git commit -m "my notes about the repository"

Without the "-m" argument, a text editor will open, allowing you to add comments about the version being committed.  

Execute the command git log to see a history of the changes comitted.  

To begin pushing the local git repository to a remote repository GitHub, login to GitHub, and create a new repository (do not impoart).   Do not create a description or a README so that the README displayed next will have instructions for pushing the local git repository to the remote GitHub repository.   Choose a privacy option.   Then from the local PC command line, enter the git commands below, substituting {url} for the URL suggested by GitHub.   URL format is something like: https://github.com/{your github account name}/[github repository name}.git


git remote add origin {url}
git push -u origin master

Thereafter, you can push changes to GitHub using the command below issued from a command window and in the folder of the repository.  


git push -u origin master

 

Git tutorial

Git cheat sheet

 

Troubleshooting

error: failed to push some refs to ...


git pull origin
git push origin

 

URL to Raw File

Replace the blob in the URL with raw.  

  • Copy the GitHub permalink that you want to convert. The permalink typically looks like this: https://github.com///blob//.
  • Replace the /blob/ segment in the URL with /raw/. For example, if the original URL is https://github.com///blob//, the modified URL will be https://github.com///raw//.

 

Libraries

File: library.properties

library.properties specification