需要帮助推动与github

时间:2013-08-18 07:54:51

标签: git github

我完成了一个关于如何用JavaScript和HTML制作待办事项列表的教程。它位于一个文件夹中,其中包含两个文件,一个是html,另一个是JavaScript。我进入了那个文件夹的路径并且git push -u origin master并且它推送了一个rails应用程序。

我是否需要重置git某人,以便我可以将其推送到我想要的地方?

当我做git log时,这就是我有点困惑

C:\Users\Marshall\Project\rails_projects\todolist>git status
# On branch master
# Changes not staged for commit:
#   (use "git add/rm <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#       deleted:    .gitignore                                                  
#       deleted:    Gemfile                                                     
#       deleted:    Gemfile.lock                                                
#       deleted:    README.rdoc                                                 
#       deleted:    REDME.md                                                    
#       deleted:    Rakefile                                                    
#       deleted:    app/assets/images/.keep                                     
#       deleted:    app/assets/javascripts/application.js                       
#       deleted:    app/assets/javascripts/funtimes.js.coffee                   
#       deleted:    app/assets/stylesheets/application.css                      
#       deleted:    app/assets/stylesheets/funtimes.css.scss                    
#       deleted:    app/controllers/application_controller.rb                   
#       deleted:    app/controllers/concerns/.keep                              
#       deleted:    app/controllers/funtimes_controller.rb                      
#       deleted:    app/helpers/application_helper.rb                           
#       deleted:    app/helpers/funtimes_helper.rb                              
#       deleted:    app/mailers/.keep                                           
#       deleted:    app/models/.keep                                            
#       deleted:    app/models/concerns/.keep                                   
#       deleted:    app/views/funtimes/index.html.erb                           
#       deleted:    app/views/layouts/application.html.erb                      
#       deleted:    bin/bundle                                                  
#       deleted:    bin/rails                                                   
#       deleted:    bin/rake                                                    
#       deleted:    config.ru                                                   
#       deleted:    config/application.rb                                       
#       deleted:    config/boot.rb                                              
#       deleted:    config/database.yml                                         
#       deleted:    config/environment.rb                                       
#       deleted:    config/environments/development.rb                          
#       deleted:    config/environments/production.rb                           
#       deleted:    config/environments/test.rb                                 
#       deleted:    config/initializers/backtrace_silencers.rb                  
#       deleted:    config/initializers/filter_parameter_logging.rb             
#       deleted:    config/initializers/inflections.rb                          
#       deleted:    config/initializers/mime_types.rb                           
#       deleted:    config/initializers/secret_token.rb                         
#       deleted:    config/initializers/session_store.rb                        
#       deleted:    config/initializers/wrap_parameters.rb                      
#       deleted:    config/locales/en.yml                                       
#       deleted:    config/routes.rb                                            
#       deleted:    db/seeds.rb                                                 
#       deleted:    lib/assets/.keep                                            
#       deleted:    lib/tasks/.keep                                             
#       deleted:    log/.keep                                                   
#       deleted:    public/404.html                                             
#       deleted:    public/422.html                                             
#       deleted:    public/500.html                                             
#       deleted:    public/favicon.ico                                          
#       deleted:    public/robots.txt                                           
#       deleted:    test/controllers/.keep                                      
#       deleted:    test/controllers/funtimes_controller_test.rb                
#       deleted:    test/fixtures/.keep                                         
#       deleted:    test/helpers/.keep                                          
#       deleted:    test/helpers/funtimes_helper_test.rb                        
#       deleted:    test/integration/.keep                                      
#       deleted:    test/mailers/.keep                                          
#       deleted:    test/models/.keep                                           
#       deleted:    test/test_helper.rb                                         
#       deleted:    vendor/assets/javascripts/.keep                             
#       deleted:    vendor/assets/stylesheets/.keep                             #                                                                               
# Untracked files:                                                              
#   (use "git add <file>..." to include in what will be committed)              #                                                                               
#       todo.html                                                               
#       todo.js                                                                 
no changes added to commit (use "git add" and/or "git commit -a")  

2 个答案:

答案 0 :(得分:1)

这是非常不言自明的。您应该首先暂存已更改的文件并提交它们。

git add .
git commit -m "something"

然后推送到远程

答案 1 :(得分:0)

你跑了

吗?
git add .

在这些命令之前

git commit -a -m "your commit message"
git push origin master