Comments (275)
Try this git command
git push origin master --force
or short of force -f
git push origin master -f
from bfg-repo-cleaner.
Are you sure you followed the instructions exactly?
http://rtyley.github.io/bfg-repo-cleaner/#usage
The error message you're seeing is what you would see if you hadn't used the '--mirror' flag when doing the clone. To ensure you get a fully updated repo, it's best to redo your clone, this time ensuring you use '--mirror', and run The BFG again.
from bfg-repo-cleaner.
its works thanks #@javparra
from bfg-repo-cleaner.
its working @javparra
from bfg-repo-cleaner.
it's working nicely thanks for help @javparra
from bfg-repo-cleaner.
it working @javparra
from bfg-repo-cleaner.
I am having the same issue, use git remote -v
to check the origin list
try changing git remote repo name by using git remote add origin [repo-url]
and then push
from bfg-repo-cleaner.
its working thanks @javprra
from bfg-repo-cleaner.
Thanks @javparra !
from bfg-repo-cleaner.
Thanks Ya
from bfg-repo-cleaner.
Had same issue with a Beanstalk repo. Discovered by default they disable "non Fast-Forward pushes" on their end. To enable you need to check a box located https://[account-name].beanstalkapp.com/repositories/[git-repo]/edit.
from bfg-repo-cleaner.
Yeah! Its works.
Thanks
from bfg-repo-cleaner.
Thank you so much @javparra
from bfg-repo-cleaner.
Greate... thx a bunch!
from bfg-repo-cleaner.
Its working thank you
from bfg-repo-cleaner.
Thank you very much @javparra
from bfg-repo-cleaner.
Thanks @javparra
from bfg-repo-cleaner.
this work fine for me. thanks @javparra
from bfg-repo-cleaner.
Works! Thx @javparra
from bfg-repo-cleaner.
hey its working !!! thank you bro !!!
from bfg-repo-cleaner.
Thanks, great solution!
from bfg-repo-cleaner.
thank @javparra
from bfg-repo-cleaner.
It's works..Thanks @javparra
from bfg-repo-cleaner.
Thanks @javparra
from bfg-repo-cleaner.
Thanks. It;'s working
from bfg-repo-cleaner.
Its works, thanks for #@javparra
from bfg-repo-cleaner.
Try this git command
git push origin master --force
or short of force -fgit push origin master -f
thanks, with this command, my problem solved, :-)
from bfg-repo-cleaner.
Jackpot!!!
from bfg-repo-cleaner.
i found this helpfull, thanks!
from bfg-repo-cleaner.
it's working nicely, thanks idea @javparra
from bfg-repo-cleaner.
follow this method step by step
1.git init
2.git config user.name "someone"
3.git config user.email "[email protected]"
4.git add *
5.git commit -m "some init msg"
from bfg-repo-cleaner.
error: failed to push some refs to ''
This will happen when someone tries to push the files before committing
from bfg-repo-cleaner.
git push origin master -f
But I highly recommend that you must not push to the master.
Better create your own branch and make your changes there
and push your changes to your branch like this
git add -A (to save your changes to stage)
git commit -m "Your commit message eg.(Able to login)" ( to commit your changes)'
git push origin branchname (to push it your repository)
and create merge request(gitlab)/pull request(github) and let your lead to code review and merge it to the master :)
if your tech lead wants you to correct something in your branch, go to your branch and correct it.
to push the changes to your your branch in gitlab
git add -A (to save your additional changes)
git --amend ( to add your changes to your first commit 'Able to login')
git push origin branchname -f (to push your additional changes to the repository)
from bfg-repo-cleaner.
git push --set -f origin master
worked for me
from bfg-repo-cleaner.
Thank you! I forgot to clone. It's working now.
from bfg-repo-cleaner.
from bfg-repo-cleaner.
@javparra thanks for the advice. now working.
from bfg-repo-cleaner.
@javparra Thanks
from bfg-repo-cleaner.
@javparra thanks so much
from bfg-repo-cleaner.
I had the same problem, using bitbucket. Solved after the --force, but I'm still wondering why it needs to be forced. Thanks anyway! <3
from bfg-repo-cleaner.
Thanks
i had the same issue but it has bn fixed
from bfg-repo-cleaner.
thanks @javparra
from bfg-repo-cleaner.
thanks @javparra ^^
from bfg-repo-cleaner.
thanks. it works with me! ><
from bfg-repo-cleaner.
Thanks @javparra
It's working
from bfg-repo-cleaner.
Thanks @javparra
It's working
from bfg-repo-cleaner.
Working perfect thank @javparra
from bfg-repo-cleaner.
It's working, thanks for the help @javparra
from bfg-repo-cleaner.
special thanks! it working for me! @javparra
from bfg-repo-cleaner.
Thanks man @javparra
from bfg-repo-cleaner.
thanks broth you save my night!
from bfg-repo-cleaner.
thank you so much @javparra
from bfg-repo-cleaner.
Its working Thank you so much @javparra
from bfg-repo-cleaner.
thanks @javparra
from bfg-repo-cleaner.
@javparra most don't know the difference between adding mirror and without mirror can you please add it in documentation in the website that adding mirror is important
from bfg-repo-cleaner.
Atlast it worked....Thanks alot @javparra. Can you explain what went wrong?
from bfg-repo-cleaner.
@javparra thanks thanks thanks
from bfg-repo-cleaner.
Thank you git push origin master --force worked @javparra
from bfg-repo-cleaner.
thank you it helps me @javparra
from bfg-repo-cleaner.
Thanks.
from bfg-repo-cleaner.
3 years later and still... thanks @javparra
from bfg-repo-cleaner.
@javparra thank you so much this does works but can anybody explain why that error was coming?
from bfg-repo-cleaner.
still works.......thx
from bfg-repo-cleaner.
it's working Thank you @javparra .but can anyone explain why that error was showing?
from bfg-repo-cleaner.
Hi guys, I also have a kind of similar problem
$ git push -u origin master
error: src refspec master does not match any.
error: failed to push some refs to 'https://github.com/xyzzzz.git'
from bfg-repo-cleaner.
thanks @javparra its working
from bfg-repo-cleaner.
Hi guys please help ,
ANNET@ANN MINGW64 ~/........../.....(master)
$ git push origin master
error: src refspec master does not match any.
error: failed to push some refs to 'ssh://github.com/............../..............git'
from bfg-repo-cleaner.
thanks yo . javara
from bfg-repo-cleaner.
thanks it's work !!
from bfg-repo-cleaner.
thanks its works 100%
@javparra
from bfg-repo-cleaner.
Try this git command
git push origin master --force
or short of force -fgit push origin master -f
great job bro
from bfg-repo-cleaner.
it's working)thank u so much @javparra
from bfg-repo-cleaner.
It's working. Thank you so much @javparra
from bfg-repo-cleaner.
Great!!! It's working. Thanks alot!!!!
from bfg-repo-cleaner.
Thanks @javparra the command is perfect.
from bfg-repo-cleaner.
Works! Thanks a lot! @javparra
from bfg-repo-cleaner.
Even after ensuring I have cloned with --mirror
, I get the error:
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]'
Edit and solved: I needed to "unprotect" the master branch at GitLab; after that git push
worked
from bfg-repo-cleaner.
Write this command on terminal
git push origin master --force
This means you are forcing code to push on remote and this works for me hopefully it will work for you as well
from bfg-repo-cleaner.
If you got
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'ssh://git*****'
You need unprotect the branch,
Refer to https://docs.gitlab.com/ee/user/project/protected_branches.html
Navigate to your project’s Settings ➔ Repository
Scroll to find the Protected branches section.
From the Branch dropdown menu, select the branch you want to protect and click Protect.
In the screenshot below, we chose the develop branch.
from bfg-repo-cleaner.
thank you so much @javparra
from bfg-repo-cleaner.
thank you very much @javparra
from bfg-repo-cleaner.
Thanks @javparra
from bfg-repo-cleaner.
Thanks @javparra
from bfg-repo-cleaner.
Thanks it worked @javparra
from bfg-repo-cleaner.
Thanks @javparra, its working!
from bfg-repo-cleaner.
Thanks So much @javparra
from bfg-repo-cleaner.
@javparra Hola Javier, me ha funcionado perfectamente pero me podrias explicar brevemente el origen de este error, y si tengo que hacer esto cada vez que quiera hacer un push? muchas gracias
from bfg-repo-cleaner.
Thanks it worked @javparra
from bfg-repo-cleaner.
Thank again @javparra
from bfg-repo-cleaner.
Ya it's working
from bfg-repo-cleaner.
@javparra i've serch all the day, you really save me, thank you!! (sorry if i write something wrong i dont speak inglish jajaj)
from bfg-repo-cleaner.
from bfg-repo-cleaner.
@javparra : Thanks that worked, but I have lost the other files from master. Is there any way to retain the old files and just push the new file to the master?
Yes the option is obviously we can create a pull request again from another branch but is there any way to retain the other files in master instead of following pull request procedure.
from bfg-repo-cleaner.
Works! Thanks a lot! @javparra
from bfg-repo-cleaner.
$ git push origin master --force
error: src refspec master does not match any
error: failed to push some refs to 'https://github.com/aarifali/sampleweblogin.git'
from bfg-repo-cleaner.
@javparra : Thanks that worked, but I have lost the other files from master. Is there any way to retain the old files and just push the new file to the master?
Yes the option is obviously we can create a pull request again from another branch but is there any way to retain the other files in master instead of following pull request procedure.
yes
git reset --soft HEAD~1
from bfg-repo-cleaner.
git push --set -f origin master
worked for me
thanks, it worked for me!
from bfg-repo-cleaner.
"git push origin master -f" work correctly, thanks !
from bfg-repo-cleaner.
git push --set -f origin master worked for me! Thanks
from bfg-repo-cleaner.
This also can happen in git push --set-upstream origin new-branch
if a new-branch name contain typo or mistype
from bfg-repo-cleaner.
Related Issues (20)
- how to download the .jar file? HOT 1
- Transfer GitHub account
- Can't build from source HOT 2
- Password protected: https://repository.sonatype.org/
- Disable pruning of what has been processed before
- Verifying commits HOT 3
- Cleanup only takes place after second run HOT 1
- How fix "Cleaning commits: 92% (1199/1303)java.lang.reflect.InvocationTargetException"? HOT 1
- Just thanks for helping god for you
- Including link: https://github.com/jarhot1992/Remote-ADB/issues
- Including link: https://rtyley.github.io/
- Including link: https://rtyley.github.io/
- Including link: https://rtyley.github.io/
- Including link: https://rtyley.github.io/
- Including link: https://rtyley.github.io/
- fft2d.tgz (53KB) updated: 2006/12/28
- How to build the tool? HOT 1
- Can I tag a commit as "protected"?
- Delete files with no extension
- Can not push - remote: GitLab: You cannot create a branch with an invalid name
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bfg-repo-cleaner.