Skip to content

Instantly share code, notes, and snippets.

View catm705's full-sized avatar

Cat Gelinas catm705

View GitHub Profile
git reset HEAD~2 // however many commits you want to squash into one
git add .
git commit -m 'bigfoot is real'
git push origin feature/bigfoot --force
@catm705
catm705 / gist:11255842
Last active March 24, 2021 04:02
GIT with GROUPS
________________________________________________________________________
**** GIT HUB WITH GROUP PROJECTS ****
________________________________________________________________________
* git branch -d → Will delete the branch completely if it SUCKS.
* AlWAYS pull first before you start your work.
* git checkout develop → Never work on master branch.
- Your MASTER branch must always work.
________________________________________________________________________
** Beginning of Day: **
@catm705
catm705 / Gemfile
Last active August 29, 2015 13:58 — forked from zioplox11/Gemfile
GEMFILE - USE THIS ONE!!
group :development, :test do
gem 'launchy'
gem 'capybara'
gem 'pry-rails'
gem 'rails-erd'
gem 'rspec-rails', '~> 3.0.0.beta'
gem 'jasmine'
gem 'shoulda-matchers'
gem 'factory_girl_rails'
gem 'rubocop'
@catm705
catm705 / Gemfile
Last active August 29, 2015 13:58 — forked from phlco/Gemfile
# What about including `pry`, `rspec` or `guard`?
# They're loaded automatically as dependencies
group :development, :test do
# Annotates ActiveRecord Models, routes and others based on the database schema
gem "annotate"
# generates entity relationship diagrams based on Active Record models
# Postscript bugs may be fixed with:
@catm705
catm705 / gist:10011321
Last active March 24, 2021 04:01
Steps for Rails w/Rspec App (initlal - no CRUD, just for :development, :test)
----------------------------------------------------------------------
#### Steps to create Rails App ####
----------------------------------------------------------------------
1.) rails new app_name -d postgresql
'Jesse's way': rails g model Complaint descriptor:string address:string latitude:decimal longitude:decimal zip:integer
2.) database.yml → 'Phil's gist'
- put in: echo $USER in the terminal right after to make sure it works.
3.) rake db:create
4.) Insert ‘gem’ gist for development:
group :development, :test do
gem 'pry-rails'
gem 'rspec'
gem 'rspec-rails'
gem 'guard'
gem 'guard-rspec'
gem 'guard-bundler', require: false
gem 'terminal-notifier-guard'
gem 'shoulda-matchers'
end

Moving your project up

When you work on a Rails project you want your .git repo to be in the root of your Rails App.

This is very important for hosting your app on Heroku.

Many of you have the following repo structure:

# A project folder, with a rails app inside of it.