Jump to content
  • Advertisement
Josheir

Backing up GitHub Repos

This topic is 510 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone have a super easy way to backup a GITHUB repo (should it be the remote or the local?) that will be easy to reinstall if needs be, and will work without complications?  I am new to the command line.

Thank you,

Josheir

Share this post


Link to post
Share on other sites
Advertisement

Your local git repository and the git repository you host on GitHub act as a backup of each other by design.
If GitHub closes down, is hacked etc. clone your local repository on some other hosting service; if your computer passes away, check out the GitHub repository on any number of replacement computers. No commands fancier than clone, checkout, push and pull are involved.

For further redundancy you need three or more copies of your repository (in addition to your own local one and the GitHub one), which could be

  • a traditional backup of your computer (including your local repository directory, and if possible the whole working directory for completeness and convenience); restore by simply overwriting files
  • other contributors, each refreshing their working copy on their respective computers from the same "central" repository
  • other hosting services, with you and other contributors pushing the same changes to each shared repository

For greater reliability you need automation. For example, a periodic task running on a internet facing server with its own git repository can pull changes from the GitHub repository and possibly push them to another public git hosting service.

Share this post


Link to post
Share on other sites
Just now, LorenzoGatti said:

 

  • a traditional backup of your computer (including your local repository directory, and if possible the whole working directory for completeness and convenience); restore by simply overwriting files

Where is my repository directory?  I looked in the Default Repository Location and also clicked on the local Git Repository link but didn't see anything gitish.  

And by working directory, will the folder for my project do?  I'm using Visual Studio for C++.  I never did understand the property pages :

Output Directory              :    $(SolutionDir)$(Platform)$(Configuration)\

Intermediate Directory     :    $(Platform)\$(Configuration)\

 

Thank you; some common stuff I should know I guess,

Josheir

You did mean my working folder for my Visual Studio Project?

Share this post


Link to post
Share on other sites
4 hours ago, Josheir said:

Does anyone have a super easy way to backup a GITHUB repo (should it be the remote or the local?) that will be easy to reinstall if needs be

A Git repository is just a bunch of folders on your disk. It can be backed up the same way any other collection of folders and files can be: copy it to offline storage media, back it up using a cloud backup service, et cetera. You don't need to treat it any differently.

2 hours ago, Josheir said:

Where is my repository directory?

It's the root directory for your project.

2 hours ago, Josheir said:

but didn't see anything gitish

Normally you won't. Git stores its metadata in a subdirectory of the root directory of any given repository. This subdirectory is named ".git" and is typically made invisible so you can't accidentally tamper with it via explorer.

2 hours ago, Josheir said:

Output Directory

This is the directory where the final output files (built executables, et cetera) will be written to.

2 hours ago, Josheir said:

Intermediate Directory

This is the directory where non-final output artifacts (object files, dependency information, files-to-clean-lists, other scratch files) are written.

 

 

Share this post


Link to post
Share on other sites
3 hours ago, Josheir said:

Output Directory              :    $(SolutionDir)$(Platform)$(Configuration)\

Intermediate Directory     :    $(Platform)\$(Configuration)\

Well while we're here...where are these variables defined at?

Thanks Jpetrie,

Josheir

Share this post


Link to post
Share on other sites
5 minutes ago, Josheir said:

Well while we're here...where are these variables defined at?

 

Right in one of the project settings panes.

Share this post


Link to post
Share on other sites

Word of advice: if you try and backup your git repositories to Microsoft CloudDrive, it doesn't copy the .git directory, and you are left with just a collection of source files...

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!