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
First use git pull origin your_branch_name
Then use git push origin your_branch_name
Also you can use the following command:
git push -u origin master
This creates (-u) another branch in your remote repo. Once the authentication using ssh is done that is.
For me the problem come from the name of my branch : "#name-of-my-branch", without "#" it's work fine!
I had the same problem
I resolved it that used below command
$ git branch --set-upstream develop origin/develop
and it will add a config in the config file in the .git folder.
For me, it was because I had deleted the hidden .git folder.
I fixed it by deleting the folder, re-cloning, and re-making the changes.
on a very simple side, once you have other branches, you can't just use for pushing a branch
git push
But you need to specify the branch now, even if you have checkout the branch you want to push, so
git push origin <feature_branch>
Where can be even the master
branch