Skip to content

Instantly share code, notes, and snippets.

@davidott
Created December 28, 2011 01:26
Show Gist options
  • Save davidott/1525709 to your computer and use it in GitHub Desktop.
Save davidott/1525709 to your computer and use it in GitHub Desktop.
Trying to push to git and new controller /views
class SayController < ApplicationController
def hello
@time = Time.now
@files = Dir.glob('*')
end
def goodbye
@time = Time.now
end
def filenames # add the filenames method
@files = Dir.glob('*')
return @files
end
def say_goodnight(name)
Say_goodnight result = 'good night, ' + name
return result
end
#time for bed...
puts say_goodnight('Marry-Ellen')
puts say_goodnight('John-Boy')
end
Davids-MacBook-Pro:blog daviddotterweich$ git.add
-bash: git.add: command not found
Davids-MacBook-Pro:blog daviddotterweich$ git.
-bash: git.: command not found
Davids-MacBook-Pro:blog daviddotterweich$ git. add
-bash: git.: command not found
Davids-MacBook-Pro:blog daviddotterweich$ git
usage: git [--version] [--exec-path[=<path>]] [--html-path]
[-p|--paginate|--no-pager] [--no-replace-objects]
[--bare] [--git-dir=<path>] [--work-tree=<path>]
[-c name=value] [--help]
<command> [<args>]
The most commonly used git commands are:
add Add file contents to the index
bisect Find by binary search the change that introduced a bug
branch List, create, or delete branches
checkout Checkout a branch or paths to the working tree
clone Clone a repository into a new directory
commit Record changes to the repository
diff Show changes between commits, commit and working tree, etc
fetch Download objects and refs from another repository
grep Print lines matching a pattern
init Create an empty git repository or reinitialize an existing one
log Show commit logs
merge Join two or more development histories together
mv Move or rename a file, a directory, or a symlink
pull Fetch from and merge with another repository or a local branch
push Update remote refs along with associated objects
rebase Forward-port local commits to the updated upstream head
reset Reset current HEAD to the specified state
rm Remove files from the working tree and from the index
show Show various types of objects
status Show the working tree status
tag Create, list, delete or verify a tag object signed with GPG
See 'git help <command>' for more information on a specific command.
Davids-MacBook-Pro:blog daviddotterweich$ git add
Nothing specified, nothing added.
Maybe you wanted to say 'git add .'?
Davids-MacBook-Pro:blog daviddotterweich$ git add .
Davids-MacBook-Pro:blog daviddotterweich$ git push
Everything up-to-date
Davids-MacBook-Pro:blog daviddotterweich$ git push
Everything up-to-date
Davids-MacBook-Pro:blog daviddotterweich$ git
usage: git [--version] [--exec-path[=<path>]] [--html-path]
[-p|--paginate|--no-pager] [--no-replace-objects]
[--bare] [--git-dir=<path>] [--work-tree=<path>]
[-c name=value] [--help]
<command> [<args>]
The most commonly used git commands are:
add Add file contents to the index
bisect Find by binary search the change that introduced a bug
branch List, create, or delete branches
checkout Checkout a branch or paths to the working tree
clone Clone a repository into a new directory
commit Record changes to the repository
diff Show changes between commits, commit and working tree, etc
fetch Download objects and refs from another repository
grep Print lines matching a pattern
init Create an empty git repository or reinitialize an existing one
log Show commit logs
merge Join two or more development histories together
mv Move or rename a file, a directory, or a symlink
pull Fetch from and merge with another repository or a local branch
push Update remote refs along with associated objects
rebase Forward-port local commits to the updated upstream head
reset Reset current HEAD to the specified state
rm Remove files from the working tree and from the index
show Show various types of objects
status Show the working tree status
tag Create, list, delete or verify a tag object signed with GPG
See 'git help <command>' for more information on a specific command.
Davids-MacBook-Pro:blog daviddotterweich$ git commit
Aborting commit due to empty commit message.
Davids-MacBook-Pro:blog daviddotterweich$ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: .DS_Store
# modified: app/.DS_Store
# new file: app/controllers/say_controller.rb
# new file: app/helpers/home_helper.rb
# new file: app/helpers/say_helper.rb
# modified: app/models/post.rb
# modified: app/views/.DS_Store
# modified: app/views/home/home.html.erb
# modified: app/views/posts/_form.html.erb
# new file: app/views/say/filenames.erb
# new file: app/views/say/goodbye.html.erb
# new file: app/views/say/hello.html.erb
# new file: app/views/say/say_goodnight.html.erb
# modified: config/routes.rb
# new file: test/functional/home_controller_test.rb
# new file: test/functional/say_controller_test.rb
#
Davids-MacBook-Pro:blog daviddotterweich$ git commit added new controller and views
error: pathspec 'added' did not match any file(s) known to git.
error: pathspec 'new' did not match any file(s) known to git.
error: pathspec 'controller' did not match any file(s) known to git.
error: pathspec 'and' did not match any file(s) known to git.
error: pathspec 'views' did not match any file(s) known to git.
Davids-MacBook-Pro:blog daviddotterweich$ git commit "added new controller and views"
error: pathspec 'added new controller and views' did not match any file(s) known to git.
Davids-MacBook-Pro:blog daviddotterweich$ git commit 'added new controller and views
> exit
>
Davids-MacBook-Pro:blog daviddotterweich$ git commit 'added new views and controller'
error: pathspec 'added new views and controller' did not match any file(s) known to git.
Davids-MacBook-Pro:blog daviddotterweich$ git commit
error: There was a problem with the editor 'vi'.
Please supply the message using either -m or -F option.
Davids-MacBook-Pro:blog daviddotterweich$ git commit -m added new controller and views
error: pathspec 'new' did not match any file(s) known to git.
error: pathspec 'controller' did not match any file(s) known to git.
error: pathspec 'and' did not match any file(s) known to git.
error: pathspec 'views' did not match any file(s) known to git.
Davids-MacBook-Pro:blog daviddotterweich$ git commit -m 'added new controller and views'
[master a75eaea] added new controller and views
15 files changed, 105 insertions(+), 3 deletions(-)
create mode 100644 app/controllers/say_controller.rb
create mode 100644 app/helpers/home_helper.rb
create mode 100644 app/helpers/say_helper.rb
create mode 100644 app/views/say/filenames.erb
create mode 100644 app/views/say/goodbye.html.erb
create mode 100644 app/views/say/hello.html.erb
create mode 100644 app/views/say/say_goodnight.html.erb
create mode 100644 test/functional/home_controller_test.rb
create mode 100644 test/functional/say_controller_test.rb
Davids-MacBook-Pro:blog daviddotterweich$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment