Method: DesignShell::Repo#checkout

Defined in:
lib/designshell/repo.rb

#checkout(commit = nil, branch = nil) ⇒ Object



82
83
84
85
86
87
88
89
90
# File 'lib/designshell/repo.rb', line 82

def checkout(commit=nil,branch=nil)
	specific_commit = !!commit && !commit.index('HEAD')
	if specific_commit
		@git.checkout commit
	else
		branch ||= 'master'
		@git.checkout(branch)
	end
end