Wilson Mar bio photo

Wilson Mar

Hello. Hire me!

Email me Calendar Skype call 310 320-7878

LinkedIn Twitter Gitter Google+ Youtube

Github Stackoverflow Pinterest

Git stores versions of files in GitHub for backup and version management


This video shows how Git works with GitHub (or GitLab) to download files, and how Git’s clone and push makes GitHub a better backup than redundant copies of files.


(The diagram above was created using Camtasia 3 on Mac based on screenshots in PowerPoint containing the narrative below.)

Narrative (captioning)

GitHub.com (and its equivalents) store repositories, or repos for short.

If we want a copy of a repo on our local machine, we have several choices.

If we don’t intend on changing anything, on GitHub we can click Download ZIP to download a file to our machine’s Downloads folder.


The name of the zip file downloaded has two parts: the repo’s name and the branch downloaded. This is because a zip file is designed to contain only one rather than multiple branches like Git.

After we unzip to a new folder, its files are accessible by a Mac Finder or Windows File Explorer as well as IDEs and custom apps.

Apps usually have their own default folder so they have a consistent place to look for assets. So many unzip directly into that default folder.

There is always risk of hardware or human failure, so we need to be able to fall back on older versions. Traditionally, duplicate copies of files and entire disks are created occasionally as backups, with zip files copied to an external location (usually with a date and time stamp in the file folder name). But these occasional copies usually don’t happen often enough, so there is still risk of loss.

And, external copies make it difficult to compare differences among different versions, even though IDEs have their own utility to compare files to find differences.

So most people think this a messy, error-prone approach.

The more popular alternative today is, instead of making duplicate copies, install a Git client program that stores the entire history of changes in its local .git folder containing objects that track every change in every file.

Git clients have a low-level mechanism to identify differences. So you don’t need to keep multiple full backups copies locally. The program recognizes various git commands that many IDEs also can issue.

So you don’t need to use Terminal commands all the time.

Instead of manual downloads and unzips, the client program clone repos from a remote GitHub.

Incremental changes are pushed back to the remote repository.

GitHub is, essentially, the ultimate external backup.


More on DevOps

This is one of a series on DevOps:

  1. DevOps_2.0
  2. User Stories for DevOps

  3. Choices for DevOps Technologies
  4. Java DevOps Workflow
  5. AWS DevOps (CodeCommit, CodePipeline, CodeDeploy)
  6. AWS server deployment options

  7. Digital Ocean
  8. Cloud regions
  9. AWS Virtual Private Cloud
  10. Azure Cloud Powershell

  11. Git and GitHub vs File Archival
  12. Git Commands and Statuses
  13. Data Security GitHub
  14. Git Commit, Tag, Push
  15. Git Utilities
  16. GitHub API

  17. TFS vs. GitHub

  18. Jenkins Server Setup
  19. Jenkins Plug-ins
  20. Jenkins Freestyle jobs
  21. Jenkins2 Pipeline jobs using Groovy code in Jenkinsfile

  22. Dockerize apps
  23. Docker Setup
  24. Docker Build

  25. Maven on MacOSX

  26. Powershell Ecosystem
  27. Powershell on MacOS
  28. Powershell Desired System Configuration

  29. Ansible

  30. MySQL Setup

  31. SonarQube static code scan

  32. API Management Microsoft
  33. API Management Amazon

  34. Scenarios for load