• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

error: src refspec main does not match any

 
Ranch Hand
Posts: 1049
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi experts,

I have been trying so hard to push my files to github to no avail.  It's been 2 days already and nothing seems to work.
Hope someone can point out to me what is amissed in my steps.
Tks.





 
Bartender
Posts: 15737
368
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can't push because you have nothing committed.

You can't commit because you have nothing added to the index.

You can't add because the file path of one of your untracked files is too long:

The naive solution would be to change the file path of these files.

The real solution is to ask yourself why you're trying to add these files to your source repository in the first place. You should only add hand-coded source files; not binaries, generated source files or tools.

What does your .gitignore file look like? You should set it up so it ignores everything except Dockerfile, README.md, pom.xml and the src/ folder.

What's inside Servers/ and myPetStore/? Nested projects that you want to add to your repository as well? Then put .gitignore files inside those folders as well and configure them properly.

As a final remark, ALWAYS run git status before running git commit. It will display what files you have added to the index before you commit them. Make sure you haven't added any files you don't want committed.
 
Poop goes in a willow feeder. Wipe with this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic