I’ll be the first to admit, that when we first started using Git for our FYDP (Fourth Year Design Project) I really didn’t understand the whole distributed paradigm of distributed VCS (versioning control system), largely because I’ve been using in the Perforce in the workplace which is the typical depot and client model.
Even though I still barely understand the whole distributed workflow of using branching and merging branches together it was not the reason why I wanted to setup a VCS on my server. I really just wanted a backup and the ability to checkout my code on any computer that has git installed…. especially now that I’ve actually started to work on code that may
not interest people.
Here are the following steps I found on the internet that helped me setup my environment (with Bluehost):
- Installing Git
- Understanding a bare repository
- Setting up environment variables
The instructions here are pretty easy to follow and I didn’t run into any problems (just make sure to grab the most recent release). The blog post goes on to mention some troubles he had with the ‘true’ command but I didn’t experience the same.
This one sadly took me a while. I had kept performing the regular init on my repository on the server and then cloning it on my laptop. When trying to push changes I would get a ton of errors because the repo wasn’t bare. Creating a bare repository essentially just removes the working files and only keeps the .git VCS files.
Installing git placed the executables in a local bin folder. For some reason all the git commands executing from my laptop wouldn’t execute .bashrc where I had exported the new path to include my profile’s bin. Being too lazy to just include the path when executing every push/pull statement I had found that you can set them in the git config file! Joy!
Here is just a great article on the branching workflow as well!
Time to code!