git push error : failed to push some refs to

>>git push
To github.xxxx..git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.xxxxxx.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.


>>git pull
error: Your local changes to the following files would be overwritten by merge:
xxx.file

>>git push -u origin master
To github.xxxx.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.xxxx.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

>>git pull --rebase origin master
error: cannot pull with rebase: Your index contains uncommitted changes.
error: please commit or stash them.

SOLUTION :

>>git pull --rebase --autostash
Created autostash: 789b1ss
HEAD is now at 6192vv adding the file
First, rewinding head to replay your work on top of it...
Applying: adding the script made from radar incidents
Applied autostash.

>>git push


Comments

Popular posts from this blog

Load data from CSV into HIVE table using HUE browser

Gitlab change project visibility from private to internal

Setting property 'keystoreFile' did not find a matching property. No Certificate file specified or invalid file format