launchscout / nku

NKU Class Spring
5 stars 14 forks source link

Need help with git #74

Closed alexkoepke closed 10 years ago

alexkoepke commented 10 years ago

i would like to pull my branch (which has the most "up-to-date" code) to my master but I get the following error.

action@koepkea1-72836:~/nku-rails-old(master)$ git pull                                                                                                        
Auto-merging db/schema.rb                                                                                                                                      
CONFLICT (content): Merge conflict in db/schema.rb                                                                                                             
Auto-merging config/routes.rb                                                                                                                                  
Auto-merging app/views/students/new.html.erb                                                                                                                   
CONFLICT (add/add): Merge conflict in app/views/students/new.html.erb                                                                                          
Auto-merging app/views/students/index.html.erb                                                                                                                 
CONFLICT (add/add): Merge conflict in app/views/students/index.html.erb                                                                                        
Auto-merging app/models/student.rb                                                                                                                             
CONFLICT (add/add): Merge conflict in app/models/student.rb                                                                                                    
Auto-merging app/controllers/students_controller.rb                                                                                                            
CONFLICT (add/add): Merge conflict in app/controllers/students_controller.rb                                                                                   
Auto-merging app/controllers/sessions_controller.rb                                                                                                            
CONFLICT (add/add): Merge conflict in app/controllers/sessions_controller.rb                                                                                   
CONFLICT (modify/delete): app/assets/stylesheets/application.css deleted in 5f65be8be2389aa9f73c42687bf21df2173839c4 and modified in HEAD. Version HEAD of app/
assets/stylesheets/application.css left in tree.                                                                                                               
Auto-merging Gemfile.lock                                                                                                                                      
CONFLICT (content): Merge conflict in Gemfile.lock                                                                                                             
Auto-merging Gemfile                                                                                                                                           
Recorded preimage for 'app/controllers/sessions_controller.rb'                                                                                                 
Recorded preimage for 'app/controllers/students_controller.rb'                                                                                                 
Recorded preimage for 'app/models/student.rb'                                                                                                                  
Recorded preimage for 'app/views/students/index.html.erb'                                                                                                      
Recorded preimage for 'app/views/students/new.html.erb'                                                                                                        
Recorded preimage for 'db/schema.rb'                                                                                                                           
Automatic merge failed; fix conflicts and then commit the result.                                                                                              
action@koepkea1-72836:~/nku-rails-old(master*)$
swiedaa1 commented 10 years ago

Try git push origin master

My bad, thought you were pushing. Ehhhh, I dont know :(

swiedaa1 commented 10 years ago

So, I dont know much about pulling, but you can push to your master. I'm not sure why you would try to pull it since you're not moving it. I'm going to stand behind the git push origin master bit since thats how I get it to master. Anywho, heres a link. It might help. https://help.github.com/articles/using-pull-requests

alexkoepke commented 10 years ago

I am afraid!! I really don't want to loose what's on my branch. — Alex Koepke (513) 236-7281

On Fri, Feb 28, 2014 at 8:28 PM, swiedaa1 notifications@github.com wrote:

Try

git push origin master

Reply to this email directly or view it on GitHub: https://github.com/gaslight/nku/issues/74#issuecomment-36411524

swiedaa1 commented 10 years ago

No worries, you can see previous versions and alterations :) Let me go grab a link for mine so I can show you.

If you click here, you can see all of my commits. https://github.com/swiedaa1/nku-rails/commits/master

If you click inside, you can see the alterations. Green are the new ones, red are removed things.

jaimerump commented 10 years ago

This might be useful. http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging

rockwood commented 10 years ago

Are you trying to merge a branch into master, or pull code from github?

alexkoepke commented 10 years ago

I am trying to merge my new-nku-rails branch with my my master nku-rails.

To be clear I don't care about what is on the master I want what is on/in the branch to be the master. — Alex Koepke (513) 236-7281

On Sat, Mar 1, 2014 at 9:27 AM, Kevin Rockwood notifications@github.com wrote:

Are you trying to merge a branch into master, or pull code from github?

Reply to this email directly or view it on GitHub: https://github.com/gaslight/nku/issues/74#issuecomment-36425923

rockwood commented 10 years ago

When your on master (git checkout master), you want to run git merge new-nku-rails. That will merge the changes from new-nku-rails into master

alexkoepke commented 10 years ago

okay I'll try that.

alexkoepke commented 10 years ago

Thank you git merge new-nku-rails worked.