ruby on rails - Heroku: ! [rejected] master -> master (non-fast-forward) -


i , error whenever try push rails app heroku. do fix this? did git init, git add ., git commit -m "complete", , git push heroku master

to https://git.heroku.com/shuabe.git ! [rejected]        master -> master (non-fast-forward) error: failed push refs 'https://git.heroku.com/james.git' hint: updates rejected because tip of current branch behind hint: remote counterpart. integrate remote changes (e.g. hint: 'git pull ...') before pushing again. hint: see 'note fast-forwards' in 'git push --help' details. 

someone has committed have update brach width git pull in order date.

git fetch --all --prune git pull origin master 

fetch update branches & pull grab latest content master branch.

if read error explaining do.

hint: updates rejected because tip of current branch behind hint: remote counterpart. integrate remote changes 

more detailed

you trying push remote branch has commits don't have them locally in branch. in order push non-fast-forward repository branch must have latest updates remote repository.

how grab latest updates?

git fetch --all --prune 

this command grab content of whole remote repository , update internal git storage (pack & index files) inside .git folder.

git pull origin master 

this command fetch & merge remote branch local branch (master) , after able push changes.


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -