Skip to content

Instantly share code, notes, and snippets.

View afarooki-point's full-sized avatar
:octocat:

Ahmed afarooki-point

:octocat:
  • Point
  • Palo Alto, CA
View GitHub Profile
@afarooki-point
afarooki-point / git-cleanup-repo
Created February 2, 2022 00:00 — forked from robmiller/git-cleanup-repo
A script for cleaning up Git repositories; it deletes branches that are fully merged into `origin/master`, prunes obsolete remote tracking branches, and as an added bonus will replicate these changes on the remote.
#!/bin/bash
# git-cleanup-repo
#
# Author: Rob Miller <rob@bigfish.co.uk>
# Adapted from the original by Yorick Sijsling
git checkout master &> /dev/null
# Make sure we're working with the most up-to-date version of master.
git fetch

Rails naming conventions

General Ruby conventions

Class names are CamelCase.

Methods and variables are snake_case.

Methods with a ? suffix will return a boolean.