When I try:
$ git push
I get this in my Terminal:
fatal: The current branch master has no upstream branch
I use Terminal on Mac OS 10.15 (Catalina).
I could not find out the reason. Can you help? Thank you in advance.
Hi John, I wanted to follow up on this (if you still have time to look at it):
The output of git status is:
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
The "push"-command is still just hanging in my terminal… nothing happening.
thank you!
… and below the above output one more line:
nothing to commit, working tree clean
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good day,
Its because you haven't defined the upstream branch, please try the below command instead.
$ git push origin <branch_name>
If you are trying to modify master branch it would be:-
$ git push origin master
Thanks!
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John
Thank you for your reply. I tried:
$ git push origin master
The terminal doesn't do anything. No upload.
I tried:
$ git commit -m "Update"
Terminal reply:
[master a3a92db] index
1 file changed, 1 insertion(+)
So far, so good. But once I try to push, nothing happens. No password request. No error message either.
Is it because I use 2-step-authentication?
Also, in my terminal I have:
git version 2.23.0
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.