-
Notifications
You must be signed in to change notification settings - Fork 20
Can't push to github #387
Comments
I looked up the error code on github help. I pasted what it said below. Dealing with non-fast-forward errors If another person has pushed to the same branch as you, Git won't be able to push your changes: git push origin master git fetch origin Fetches updates made to an online repositorygit merge origin YOUR_BRANCH_NAME Merges updates made online with your local workOr, you can simply use git pull to perform both commands at once: git pull origin YOUR_BRANCH_NAME Grabs online updates and merges them with your local work |
The formatting of your message makes it really hard to read. You can insert text verbatim, such as stuff you've copied from the terminal, by surrounding it with three backticks.
which will appear here as:
While composing a comment, you can always click the "Preview" tab to see what it's going to look like, so you can refine. Armed with this new knowledge, can you show me what |
I included a screen shot of what 'github help' says about non-fast-forward errors, which my problem apparently falls under.
|
I'm so sorry this has happened to you! At the beginning of class Jenny mentioned that git is great until you run into problems... this is that point 😢 Fortunately you don't have to worry about branch names (you only have master): If you're reading help online, it may get confusing if you see references to merging branches. You're not merging branches, but merging local & remote. Fortunately, the process is essentially the same! What you want to do is resolve the merge, and then git will let you push and pull again. This needs to be done locally. The first thing to do would be to navigate to your git repo in terminal and run Then, could you print that error message here, within the backtick formatting Jenny mentioned? Further reading in this StackExchange thread: You can also check out the Official Git Documentation 🎉, which is an awful read but will give you the most detail on solving this error. |
I suspect you need to do So this is still my question:
|
Sorry, I misunderstood which part of my original message you meant.
This is the error message I get when I try to push to github:
|
I did what Sam mentioned and ran
|
It seems I was able to resolve the problem by following Sam's suggestions. |
Have you tried pulling? "Integrate the remote changes (e.g. 'git pull ...') before pushing again." I got a similar error and that fixed it for me. It should integrate with On Fri, Oct 21, 2016 at 9:53 PM, Julia notifications@github.com wrote:
|
hey i am also facing same problem see here ---- $ git push origin master another command git status i am anable to commit my project to github since 2 days |
@khushahal the same for me. I need to force to push and Github diffs doesn't see changes in Diff view but they are in the code O.o |
@kjkaal write this command |
Erro no momento do push STAT545-UBC/Discussion#387
delete the repository on github create new(don't commit on github), push your files from you localhost. |
Had the same problem- mayurpaghdal07's solution worked for me. Thank you!!! |
! [rejected] master -> master (non-fast-forward) |
@xajhwj Try doing a |
try:
|
@mohammedmunna thanks for those two lines on your comment. That solved my problem. |
Had same problem... |
|
I also having same problrm |
blahhhhhhhh |
git push origin master --force worked just fine for me |
git pull --allow-unrelated-histories origin master these commands just worked...thanks alot |
git pull --allow-unrelated-histories origin master this to line work for mee |
git push origin master --force |
git push origin master --force |
To https://github.com/AshaAbukar/AFRICAN-BUZZ.git how can i attend that |
Basically, this issue occurs when online and offline repositories are not merged. |
worked thanks |
|
worked thanks |
git push origin master --force worked just fine for me |
what does this line do? |
Hello,
I am unable to push my HW_5 to github. I am getting an error message saying the following
To https://github.com/STAT545-UBC/kaal_katrin-julia.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/STAT545-UBC/kaal_katrin-julia.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.
I think it may be related to removing a file on github labeled Rapp.history earlier today.
I have no iead how this file ended up on github and removed it to keep my repo clean.
I didn't pull before trying to push and now, when I try to pull from github it's telling me
error: You have not concluded your merge (MERGE_HEAD exists).
hint: Please, commit your changes before merging.
fatal: Exiting because of unfinished merge.
Nor sure how to submit my HW if I can't resolve this tonight.
The text was updated successfully, but these errors were encountered: