Mariam Adekola

Frontend Web Mentee at Zuri Team • Computer Engineering Student ...  
Read more

2021

Sep 22, 2021
Sep 22, 2021
Life long learner
Troubleshooting an issue
I encountered an issue while pushing my code from local repository to its remote version today. 

Here's what I learnt:

THIS WAS THE ERROR


To repository
 ! [rejected]  local-repo -> remote-repo (non-fast-forward) 

error: failed to push some refs to 'https://github.com/Marrockx/zc_plugin_channels.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.



HOW I SOLVED IT

I found  an helpful article from GitHub docs from my Google search which can be viewed below: 

First Solution

$ git pull origin YOUR_BRANCH_NAME
# Grabs online updates and merges them with your local work
Second Solution 

git merge branch_name
git checkout branch_name
git merge --no-ff feature_branch
git push -u origin branch_name

You can see other solutions as well

https://docs.github.com/en/get-started/using-git/dealing-with-non-fast-forward-errors

I hope you find it useful.
Sep 14, 2021
Sep 14, 2021
Joined an Early Adopter Program
I'm super excited to check out Polywork as one of the first early adopters. Oh and btw Jupiter is by far the most superior of the AI-Assistants! 🔥 😎 🤖
Loading...
Get your own page like this