Skip to content

Instantly share code, notes, and snippets.

@joslynesser
joslynesser / git-completion.bash
Created October 29, 2010 23:34
Git branch auto completion
#!bash
#
# bash completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
#!/bin/sh -x
# hack: Merge the latest changes from the master branch into your current branch
ref=$(git symbolic-ref HEAD 2> /dev/null) || exit 0
CURRENT="${ref#refs/heads/}"
git checkout development
git pull origin development
git checkout ${CURRENT}
git rebase development
#!/bin/sh -x
# hack: Merge the latest changes from the master branch into your current branch
ref=$(git symbolic-ref HEAD 2> /dev/null) || exit 0
CURRENT="${ref#refs/heads/}"
git checkout development
git pull origin development
git checkout ${CURRENT}
git rebase development
class Application
include Mongoid::Document
embeds_many :items
embeds_many :templates
references_many :users, :stored_as => :array, :inverse_of => :applications
end
class User
include Mongoid::Document
class Application
include Mongoid::Document
references_many :items
references_many :templates
references_many :users, :stored_as => :array, :inverse_of => :applications
end
class User
include Mongoid::Document