I\'m trying to push one of my projects to github, and I keep getting this error:
peeplesoft@jane3:~/846156 (master) $ git push
fatal: The current branch mas
For me, I was pushing the changes to a private repo to which I didn't had the write access. Make sure you have the valid access rights while performing push or pull operations.
You can directly verify via
Well, I was having the same trouble while uploading and I resolved it by doing the same thing which it says to do: Earlier I was trying to push through terminal to my repository in linux by https like
git push https://github.com/SiddharthChoudhary/ClientServerCloudComputing.git
But was not getting any result and hence I went down deeper and tried:
git push --set-upstream https://github.com/SiddharthChoudhary/ClientServerCloudComputing.git master
And it worked. Thus then you will get prompted with username and password. I also generated a token and instead of Password I pasted the token and thus, being done successfully.
You need to configure the remote first, then push.
git remote add origin url-to-your-repo
Actual Instructions
Please try this scenario
git push -f --set-upstream origin master
If you are on any branch, you can use this:
git push origin head -u
This will automatically create new branch of the same name on the remote.