Skip to main content
Add shell syntax highlighting
Source Link
Benjamin Loison
  • 5.8k
  • 4
  • 20
  • 37

Problem faced

I had the same problem when I was creating a new repository on GitHub and linking it with my React app in the client computer I have.

I used the following steps:

Commands used before the problem

git init git commit -m "first commit" git branch -M main git remote add origin "_git repository link here_" git push -u origin main 
git init git commit -m "first commit" git branch -M main git remote add origin "_git repository link here_" git push -u origin main 

My mistake

But as you can see, my mistake was not using the git add . command. I did this mistake, because I already had the README.md file and GitHub instructs us with basic commands while creating the repository.

My solution

My solution is to use git add . after the git init command.

Use the following set of commands in the same order to overcome the problem:

git init git add . git commit -m "first commit" git branch -M main git remote add origin "_git repository link here_" git push -u origin main 
git init git add . git commit -m "first commit" git branch -M main git remote add origin "_git repository link here_" git push -u origin main 

Problem faced

I had the same problem when I was creating a new repository on GitHub and linking it with my React app in the client computer I have.

I used the following steps:

Commands used before the problem

git init git commit -m "first commit" git branch -M main git remote add origin "_git repository link here_" git push -u origin main 

My mistake

But as you can see, my mistake was not using the git add . command. I did this mistake, because I already had the README.md file and GitHub instructs us with basic commands while creating the repository.

My solution

My solution is to use git add . after the git init command.

Use the following set of commands in the same order to overcome the problem:

git init git add . git commit -m "first commit" git branch -M main git remote add origin "_git repository link here_" git push -u origin main 

Problem faced

I had the same problem when I was creating a new repository on GitHub and linking it with my React app in the client computer I have.

I used the following steps:

Commands used before the problem

git init git commit -m "first commit" git branch -M main git remote add origin "_git repository link here_" git push -u origin main 

My mistake

But as you can see, my mistake was not using the git add . command. I did this mistake, because I already had the README.md file and GitHub instructs us with basic commands while creating the repository.

My solution

My solution is to use git add . after the git init command.

Use the following set of commands in the same order to overcome the problem:

git init git add . git commit -m "first commit" git branch -M main git remote add origin "_git repository link here_" git push -u origin main 
Active reading [<https://en.wikipedia.org/wiki/React_(JavaScript_library)>]. Added the missing punctuation - like HTML, (single) line breaks do not render here.
Source Link
Peter Mortensen
  • 31.4k
  • 22
  • 110
  • 134

Problem faced

I had the same problem when I was creating a new repository on GitHub and linking it with my react-appReact app in the client computer I have.

I used the following steps:

Commands used before the problem

git init git commit -m "first commit" git branch -M main git remote add origin "_git repository link here_" git push -u origin main 

My mistake

But as you can see, my mistake was not using the git add . command. I did this mistake, because I already had README.mdthe README.md file and GitHub instructs us with basic commands while creating the repository.

My solution

My solution is to use git add . after the git init command.

Use the following set of commands in the same order to overcome the problem:

git init git add . git commit -m "first commit" git branch -M main git remote add origin "_git repository link here_" git push -u origin main 

Problem faced

I had the same problem when I was creating a new repository on GitHub and linking it with my react-app in the client computer I have.

I used the following steps:

Commands used before the problem

git init git commit -m "first commit" git branch -M main git remote add origin "_git repository link here_" git push -u origin main 

My mistake

But as you can see my mistake was not using the git add . command I did this mistake because I already had README.md file and GitHub instructs us with basic commands while creating the repository.

My solution

My solution is to use git add . after git init command.

Use the following set of commands in the same order to overcome the problem:

git init git add . git commit -m "first commit" git branch -M main git remote add origin "_git repository link here_" git push -u origin main 

Problem faced

I had the same problem when I was creating a new repository on GitHub and linking it with my React app in the client computer I have.

I used the following steps:

Commands used before the problem

git init git commit -m "first commit" git branch -M main git remote add origin "_git repository link here_" git push -u origin main 

My mistake

But as you can see, my mistake was not using the git add . command. I did this mistake, because I already had the README.md file and GitHub instructs us with basic commands while creating the repository.

My solution

My solution is to use git add . after the git init command.

Use the following set of commands in the same order to overcome the problem:

git init git add . git commit -m "first commit" git branch -M main git remote add origin "_git repository link here_" git push -u origin main 
improved answer and formatting
Source Link
Aswin Barath
  • 1.1k
  • 11
  • 15

Problem faced

I had the same problem when I was creating a new repository on GitHub and linking it with my react-app in the client computer I have. 

I used the following steps:

Commands used before the problem

git init git commit -m "first commit" git branch -M main git remote add origin "_git repository link here"here_" git push -u origin main 

My mistake

But as you can see my mistake was not using the git add . command I did this mistake because I already had README.md file and GitHub instructs us with basic commands while creating the repository.

My solution

My solution is to use git add . after git init command.

Use the following set of commands in the same order to overcome the problem:

git init git add . git commit -m "first commit" git branch -M main git remote add origin "_git repository link here_" git push -u origin main 

Problem faced

I had the same problem when I was creating a new repository on GitHub and linking it with my react-app in the client computer I have. I used the following steps:

Commands used before the problem

git init git commit -m "first commit" git branch -M main git remote add origin "_git repository link here" git push -u origin main 

My mistake

But as you can see my mistake was not using the git add . command I did this mistake because I already had README.md file and GitHub instructs us with basic commands while creating the repository.

My solution

My solution is to use git add . after git init command.

Problem faced

I had the same problem when I was creating a new repository on GitHub and linking it with my react-app in the client computer I have. 

I used the following steps:

Commands used before the problem

git init git commit -m "first commit" git branch -M main git remote add origin "_git repository link here_" git push -u origin main 

My mistake

But as you can see my mistake was not using the git add . command I did this mistake because I already had README.md file and GitHub instructs us with basic commands while creating the repository.

My solution

My solution is to use git add . after git init command.

Use the following set of commands in the same order to overcome the problem:

git init git add . git commit -m "first commit" git branch -M main git remote add origin "_git repository link here_" git push -u origin main 
Source Link
Aswin Barath
  • 1.1k
  • 11
  • 15
Loading