I tried pushing some changes I made to my teams repo but received the following error:
$ git add .
$ git commit -m "message"
$ git push origin master
! [rejected] master -> master (fetch first)
I then tried doing a fetch (as instructed by the git hint) and received:
$ git fetch
$ git push origin master
! [rejected] master -> master (non-fast-forward)
Now I am being instructed to git pull
but am afraid my local changes will be overwritten.
After some googling I read that I should do a git stash
first to protect my local changes but am now receiving:
$ git stash
No local changes to save
So my question is what should I do next to successfully do a push while not overwriting any of my local changes in the process?
Thanks!