filmov
tv
Git error! [ rejected ] error : failed to push some refs to | us this Cm ' git push -f origin main '

Показать описание
If still you haven't resolved the error,
then use this command 👉 " git push -f origin main " 100% working
The " git push -f origin main " command is used to push into the repository .
------------------------------------------------------------------------------------------------------------------------
Today, I was trying to permanently delete a file in all commits using 👉 " git filter-branch ".
After, I needed to force a push obviously, in order to ensure that all collaborators have access to the repository without this file.
So, I tried 👉 git push -f origin "branch-name "
which gave me the usual "make sure you have the correct access rights" error.
There is no difference between [ git push -f main ] "branch" and [ git push --force main ] "branch".
-f is simply the shorthand for --force.
----------------------------------------------------------------------------------------------------------------------------
$ git push origin main
#![rejected] #main-main(fetch first)
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
#rajkishorbgp
#git
#github
________________________________________________________________________________________________
_________________________________________________________________________________________________
then use this command 👉 " git push -f origin main " 100% working
The " git push -f origin main " command is used to push into the repository .
------------------------------------------------------------------------------------------------------------------------
Today, I was trying to permanently delete a file in all commits using 👉 " git filter-branch ".
After, I needed to force a push obviously, in order to ensure that all collaborators have access to the repository without this file.
So, I tried 👉 git push -f origin "branch-name "
which gave me the usual "make sure you have the correct access rights" error.
There is no difference between [ git push -f main ] "branch" and [ git push --force main ] "branch".
-f is simply the shorthand for --force.
----------------------------------------------------------------------------------------------------------------------------
$ git push origin main
#![rejected] #main-main(fetch first)
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
#rajkishorbgp
#git
#github
________________________________________________________________________________________________
_________________________________________________________________________________________________
Комментарии