fatal The current branch master has no upstream branch

0 votes

Hi Guys,

I am trying to push my file from local system to GitHub. But I am getting this below error.

fatal: The current branch master has no upstream branch.

How can I solve this error?

Apr 30, 2020 in Git & GitHub by akhtar
• 38,260 points
4,164 views

1 answer to this question.

0 votes

Hi@akhtar,

You got this error, because you did not link your GitHub branch to your local branch. Use the below given command.

$ git push --set-upstream index.html master

Hope this will help.

answered Apr 30, 2020 by MD
• 95,460 points

Related Questions In Git & GitHub

0 votes
0 answers

Updates were rejected because the tip of your current branch is behind its remote counterpart

We have a branch called dev We access it ...READ MORE

May 5, 2022 in Git & GitHub by Kichu
• 19,040 points
9,113 views
0 votes
0 answers
0 votes
1 answer
0 votes
1 answer

fatal: Not a git repository (or any of the parent directories): .git

Hi@akhtar, I think you didn't initialize your folder ...READ MORE

answered Apr 29, 2020 in Git & GitHub by MD
• 95,460 points
8,918 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,059 views
+2 votes
1 answer
0 votes
1 answer

How to get the current branch name in Git?

Hi@akhtar, You can run the git branch command ...READ MORE

answered Dec 22, 2020 in Git & GitHub by MD
• 95,460 points
10,668 views
0 votes
1 answer

error on branch master nothing to commit, working directory clean, when try to commit my changes.

Hi@akhtar,  If you already have a .git/ folder ...READ MORE

answered Apr 10, 2020 in Git & GitHub by MD
• 95,460 points
18,460 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP