Using GitHub for Projects
If you are interested in having your project backed up and hosted for free you can use GitHub to do this. It's a bit complicated, and will require setting up a free GitHub account.
In order to use this, you'll need a few things:
"Git" (the language) needs to be downloaded and installed on your computer (already done on the Room 200 computers)
You'll need to set up a GItHub account: https://github.com/
Here is an intro to Git and GitHub, along with instructions on running Git from the terminal: https://www.jcchouinard.com/get-started-with-github/
GitHub has a limit of 100MB maximum individual file size.
Using a .gitignore file will give you control over what files are uploaded and what files are excluded
to start, download this .gitignore file, place it in the root folder of your project, and then open it with Visual Studio Code
read the instructions in the file, and use them to configure the file appropriately
If you would like to use GitHub Desktop to manage your backup/versioning
let me know and I can install it on your computer
Open the program
File _> New Repository
For location, select the folder that your project folder is located inside of
Make the repository name the same as the name of the project folder
Under Git ignore, select "none" as you've already placed your edited .gitignore file in your project folder
Click on "Create repository", and then wait until the spinning arrows at the top have finished
Publish your repository to GitHub
You now have a copy of your project safely saved on GitHub, as the "main" branch.
Once you have made substantial changes to your project, you can back it up by "committing" it to "main" on your computer, then "pushing" it to origin remote (GitHub)
If you are using Visual Studio Code to manage your backup/versioning:
You'll need the GitHub Pull extension installed in Visual Studio Code
Sign in to your GitHub account in Visual Studio Code
Go in to the Source Control View on the left, then publish your site to a public repository
If you are running into problems, you can try configuring Git using this tutorial: https://www.jcchouinard.com/install-git-in-vscode/
If you need to configure your Git username/email
Open powershell
Set your username: git config --global user.name "FIRST_NAME LAST_NAME"
Set your email address: git config --global user.email "MY_NAME@example.com"
Using Git Large File Storage for files over 100 MB (With GitHub Desktop)
· Open PowerShell.
o Change your current working directory to the root of your project folder (using cd).
o Initialize the repository:
§ git init
o Run the following command to find all files over 100MB in size:
§ Get-ChildItem -recurse | where-object {$_.length -gt 104857600 } | Sort-Object length | ft fullname, length -auto
o Any files that show up will need to their filetype flagged to be stored using Git LFS
§ Initialize git LFS:
§ Enter the command: git lfs install
§ You should see the message: Git LFS initialized.
§ If you don't see a message indicating that git lfs install was successful, close the powershell session, open a new one, then try again.
o To associate a file type in your repository with Git LFS, enter git lfs track followed by the name of the file extension you want to automatically upload to Git LFS.
§ For example, to associate a .dylib file, enter the following command:
· git lfs track "*.dylib"
§ You should see the reply: Tracking "*.dylib"
o The changes that you are making are stored in a .gitattributes file.
§ Git add .gitattributes
o You are now ready to do your commit and publish in GitHub Desktop
· Open GitHub Desktop, and go into the File Menu -> Add local repository
o The Local path should point to your project folder
§ Click "Add Repository"
§ You will now do your first local commit
o Fill out the summary message and then click "commit to master"
§ Wait for the Commit to full finish (spinning wheel stops)
o You are now ready to publish your branch to GitHub.
§ If you are already signed in to your GitHub account, click "Publish branch"
§ If not, you will probably be prompted to enter your information
o When the Publish finishes, you can check your online repository
§ Go to the Repository menu, and select "View on GitHub"