Skip to content

Instantly share code, notes, and snippets.

@cheezedigital
cheezedigital / local
Last active August 29, 2015 14:13
workflow to date.
typically, I start the morning off with:
$ cd cls3/
move to whichever/or create branch
$ git fetch
$ git pull origin master
bundle
$ mysql.server start
$rails s
@cheezedigital
cheezedigital / practice, and practice
Created January 20, 2015 14:59
proper work flow for git and github
git fetch
git checkout -b cl-### origin/sprint015
To commit your changes:
git add .
git commit -am "Commit message"
git push origin cl-###
To create pull request:
A class is used to create an object. It's like a blueprint
We have an Org class in the app
To create an Org object, we can do the following: Org.new
Or pull one from the database (orgs table): Org.find(ID)
The User class is also used to create objects
Under admin/users/index.html.haml we are looping through all the user objects in the database
users.each do |user|
...
end
@cheezedigital
cheezedigital / i'm fucking up
Created January 23, 2015 16:49
hold yer hat
cls(cl-781)$ git add -A
cls(cl-781)$ git commit -m "fingers crossed the documentaiton is correctly deleted"
[cl-781 28104bb] fingers crossed the documentaiton is correctly deleted
1 file changed, 30 deletions(-)
cls(cl-781)$ git checkout sprint015
Switched to branch 'sprint015'
Your branch is up-to-date with 'origin/sprint015'.
cls(sprint015)$ git pull origin sprint015
remote: Counting objects: 18, done.
remote: Compressing objects: 100% (17/17), done.
@cheezedigital
cheezedigital / fucking up
Created January 23, 2015 17:06
hold yer hat
cls(cl-781)$ git push origin cl-781
To https://github.com/hgslabs/cls3.git
! [rejected] cl-781 -> cl-781 (non-fast-forward)
error: failed to push some refs to 'https://github.com/hgslabs/cls3.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
cls(cl-781)$
cls(sprint016)$ git fetch
cls(sprint016)$ git status
On branch sprint016
Your branch is ahead of 'origin/master' by 102 commits.
(use "git push" to publish your local commits)
nothing to commit, working directory clean
cls(sprint016)$ git pull origin sprint016
From https://github.com/hgslabs/cls3
* branch sprint016 -> FETCH_HEAD
Already up-to-date.
in the terminal, please do.
change directories into cls, which is done like this:
cd project_name, and the output should be
Desktop$ cd project_name which in this case is cls, so it'll read something like:
Desktop$ cd cls
cls(master)$
once in the directory cls, please bundle the dependencies like so:
cls(master)$ bundle install
next up, start the mysql server like:
@cheezedigital
cheezedigital / thank you
Last active August 29, 2015 14:14
github flow
You could do a
git reset --HARD <last commit on master before your branch was merged number>
git push -f origin master
but I would prefer to look at it before you do it as it's more permanent.
It's not a pressing issue for now, but we should get it cleaned up today. I'll look at it tonight with you, cool?
Don't stress!
Tk
@cheezedigital
cheezedigital / union station
Last active August 29, 2015 14:14
derailed tracks
cls(sprint016)$ git log -n 1
commit 5f9b9bbd7c97814d22aeb5da2e1355c25d52759e
Merge: 3dca8eb 846e0fd
Author: Justin Veirs <justinveirs@gmail.com>
Date: Mon Feb 2 08:43:04 2015 -0500
Merge branch 'master' of https://github.com/hgslabs/cls3 into sprint016
cls(sprint016)$
@cheezedigital
cheezedigital / rinse repeat
Last active August 29, 2015 14:14
cherrry pick
- else
= render partial: "document_row", locals: {doc: doc, idx: idx}
>>>>>>> 6e0580a... incomplete to in progress