find and solve ||
Please wait.....

Error: Failed To Push Some Refs To Remote - git pull

Error: Failed To Push Some Refs To Remote - git pull

I can't push my chnages file in master now,  Maybe I messed up with configs or something.My git code like as given below.

git add .
git commit -m"my changes"
git push origin master


Option 1.

git pull --rebase origin main 
git push origin main

With Git 2.6+ (Sept. 2015), after having done (once)

git config --global pull.rebase true
git config --global rebase.autoStash true

Option 2.

git reset --mixed origin/master
git add .
git commit -m "enter your commit message here"
git push origin master

Option 3.

Not commiting initial changes before pushing also causes the problem.

Create new project folder and do step by step like as given below.This will address your problems.

1.git init
2.git remote add origin
3.git add .
4.git commit -m "your commit message"
5.git pull --rebase origin master
6.git push  origin master

Selena  Kandakar

Selena Kandakar

I like working on projects with a team that cares about creating beautiful and usable interfaces.


Avatar for Mahira   khanna
Mahira khanna 1

This first demo

Report Response