Skip to Main Menu

Git Up Offa That Thing

To get my site working properly, I finally had to learn git. I am now in love with it. I don’t know how I’ve lived without it for so long. I mean, I’ve known about it for a couple of years and started using it a little about 18 months ago but it was like I wasn’t ready. It was because I didn’t really understand how to use it.

My favourite resources

Here are a couple of resources (R related of course) I always have handy:

  1. Karl Broman’s tutorial: this is simple and straight to the point. Best resource for anyone who wants to get up and started quickly with git.
  2. Great book by Jenny Bryan: This is an entire book with some awesome workflows.

Other tips

  1. Using .gitignore which is a text file where you can specify files and folders that git will ignore when you use git add .

Things to remember - my workflow

  1. git clone "repository link": to link the repository to github
  2. touch .gitignore: ceates the gitignore text file
  3. git add .: this adds all changes in this directory
  4. git commit -m "commit message": commits the files with commit message: “commit message”
  5. git push: uploads my stuff to the repository

OR, just use RStudio, they’ve built it all in.

That’s all for now but I will continue to edit this post as I get better at using git.

comments powered by Disqus