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,240 points
2,857 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,340 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 in Git & GitHub by Kichu
• 16,850 points
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,340 points
6,842 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
1,590 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,340 points
4,903 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,340 points
9,115 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP