简体   繁体   中英

Why can't i push to github after cloning heroku repository

After git cloning my heroku repository, it says I' am on master branch but for some reason I cannot push any changes to github. Usually I would just enter 'git push -u origin master', and that command would push everything to my github private repository for my website.

I recently just cloned my heroku app on my ubuntu environemt using the following command:

heroku git:clone -a ubbytech

after this i added all files, make a commit and pushed everything to my website on heroku with following command:

git push heroku master

What I'am doing wrong?

fatal: 'origin' does not appear to be a git repository

Simply add a remote origin, with the url of your private repo

cd /apth/to/local/repo
git remote add origin /url/private/repo

This is usually caused by another repository pushing hint: to the same ref

If there's already some content at origin/master different from your local version's history, force push by using the --force, -f flag

# caution: this cannot be reverted.
git push origin master -f -u

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM