Setup project essentials (Git and Editor)

When you start your project, you want to set all the basic essentials up so you don’t get delayed later, this includes setting up Git and your editor.

For this project I will use BitBucket as I’ve used it for several years and it works great – its also free.

Another great alternative is GitHub.

Go ahead and register there, then create your new repository https://bitbucket.org/repo/create

You can keep basic settings when starting:

Create new repository with BitBucket

Name your project and repository appropriately.

If you haven’t used bitbucket before, you may need to setup your SSH keys up – you can do this with steps outlined here: https://support.atlassian.com/bitbucket-cloud/docs/set-up-an-ssh-key/

Once you’ve created your SSH keys and added them to your account, you should be able to upload your content to git.

You can do this by running these commands:

git remote add origin <remote>
git add .
git commit -am "Initial commit"
git push -u origin master

This will add the origin for your git to point to the repository you’ve just created, add all the files in the folder to be tracked by git, commit the changes and finally push all the changes to the repository.

that’s it – git sorted. You can type ‘git status’ and ensure it says:

On branch master
Your branch is up to date with 'origin/master'.

Now you want to setup your editor if you don’t have one.

Rails doesn’t need much, the best one (in my opinion) is Rubymine from Jetbrains. But I only use(d) this in professional environment as its not free. It does have some useful features for large projects, particularly for things like handling merge conflicts.

The one I would recommend to get started with is Visual Studio Code (https://code.visualstudio.com/download) – its lightweight and you can install plugins that you care about, which is very nice and useful.

Here are the extensions I’ve used prior to this project

The main ones you will need to follow on most of the work in this blog are:

Ruby – as the project is mainly a Ruby on Rails app, this is pretty essential

ruby-rubocop – this will be useful later if you install rubocop gem, which is not essential however advised to keep things to standard.

Git History/GitLens – these are not essential, and you may not have much use of these if you’re the only contributor to the project. These however don’t hurt to have as they could offer some useful insights when integrated with Git.

You may also want to add plugins for things like Javascript/React.