22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/swiftly/create_git.rb', line 22
def create_git()
git = Git.init( @project_path )
template(
File.join(
'templates',
'gitignore.erb'
),
File.join( @project_path, '.gitignore' )
) unless File.exists? File.join( @project_path, '.gitignore' )
git.add
if !git.config('user.name').empty?
git.commit_all('initial commit')
else
say_status "#{APP_NAME}:", "Unable to create an initial git commit. Please set your git global user.email and user.name in order to create your first commit", :yellow
end
end
|