• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

error: src refspec main does not match any

 
Ranch Hand
Posts: 821
  • 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.





 
Saloon Keeper
Posts: 13256
292
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic