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,210 points
2,479 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,300 points

Related Questions In Git & GitHub

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,300 points
5,857 views
0 votes
1 answer

error: The branch 'dev1' is not fully merged.If you are sure you want to delete it, run 'git branch -D dev1'.

Hi@akhtar, When you create one new branch in ...READ MORE

answered May 10, 2020 in Git & GitHub by MD
• 95,300 points
1,000 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
1,259 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,300 points
1,833 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,300 points
6,151 views