I was pushing my master branch to my GIT repo and go this error
fatal: 'master' does not appear to be a git repository
On the advice of a stack question I typed
git remote -v
and got
heroku https://git.heroku.com/peaceful-cove-8372.git (fetch)
heroku https://git.heroku.com/peaceful-cove-8372.git (push)
origin https://github.com/SimonWalsh1000/breathe.git (fetch)
origin https://github.com/SimonWalsh1000/breathe.git (push)
I then typed
simonalice$ git push -u origin master
And it worked but said
Branch master set up to track remote branch master from origin.
I am very new to GIT and I am not fully sure what has happened. I would be very grateful if someone could explain this sequence to me. I haven't been able to get clear answers. Is my master branch now, the master branch in GIT or is it some clone?
Many thanks
git push master
, which Git interprets as a request to push the current branch to a remote namedmaster
, rather than request to push the branchmaster
to its default remote.master
is checked out), thatgit push
will behave likegit push origin master
. That is, unless you specify a different remote, the local branchmaster
will be pushed toorigin
. You can always override it if you like, e.g.,git push heroku
to push toheroku
instead oforigin
. I don't think there's anything you need to fix.