github - git non-fast-forward rejected with upstream -


i have git repo master set in upstream, , dev branch getting every stream master.

i have commited changes on dev branch useful specific branch , not master, , i

my current branch :

git status on branch dev branch ahead of 'master' 2 commits. 

my commits visible when

git diff origin/master..head 

my branch date ( , goes through master doing before) :

git pull .  * branch            master     -> fetch_head up-to-date. 

but when push, got bashed :

git push origin https://my_git.git  ! [rejected]        dev -> dev (non-fast-forward) error: failed push refs 'https://my_git.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. 

any tips appreciated, had on several posts : git push rejected non-fast-forward or git non-fast-forward rejected , none of them seems work in case.

thanks

your problem here:

git push origin  

you did not specify branch push.
assuming using git <2.0 must set branches wish pull/push. in case trying push all branches , 1 of them generate error.

this for you

# latest changes remote git fetch --all  # merge changes local repository git pull origin dev   # push changes remote git push origin dev 

git v2.0 release notes

backward compatibility notes

when "git push [$there]" not push, have used traditional "matching" semantics far (all branches sent remote long there branches of same name on there).

in git 2.0, default "simple" semantics, pushes:

  • only current branch branch same name, , when current branch set integrate remote branch, if pushing same remote fetch from; or

  • only current branch branch same name, if pushing remote not fetch from.

you can use configuration variable "push.default" change this. if old-timer wants keep using "matching" semantics, can set variable "matching", example. read documentation other possibilities.


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

css - Can I use the :after pseudo-element on an input field? -