Search code examples
windowsgitbackupgit-remotegit-gui

How to set up / use git as (little more than) a simple backup system


I'm a single developer working on several small, unrelated projects written in C/C++.

I tried using git (mostly because a client asked me to - I think he doesn't know what a DVCS is but must have heard that git is fashionable :) ) but I was baffled by the documentation, and the tutorials all seemed tailored for needs that are entirely different from mine: large projects with teams of programmers.

I wanted to start using git simply as a "backup system on steroids" first, learning new features later as I need them. I thought the setup and daily usage would be easy, but after a whole day of tutorials I've yet to commit a single project (and I need a bottle of Maalox and some aspirin :) )

To summarize:

  1. I'm a solo programmer (no one else will touch the code).
  2. I use a single Windows laptop (no need to work from multiple PCs).
  3. No need for branches (the projects are small).
  4. I do need a remote repository (only as an emergency measure against HD crashes / laptop theft. I have a private server where I can install what I need).
  5. I almost never need to retrieve old versions of my code (in 2014 I did that exactly twice, in a few minutes, using backups).
  6. The code is already well-commented as it is (the commits will probably have very simple comments).
  7. My workflow is simple: I want to open a project on my own HD, work on it until the feature is added / the bug is fixed / I get sleep deprivation, then commit the changes and move to the next task.

So, let's say that I have projects Foo and Baz for Client1, and Bar for Client2. What I need to know is:

  • the best way to set up the system, given my requirements.
  • what commands to issue during daily usage (see point 7)

I've installed Git GUI (on the laptop) and GitLab (on the server), but I'm amenable to change.

Thanks in advance,

Flavio Rizzardi


Solution

  • Chapter 2. In less than 1 hour you have all working.