Closed mechatroniks-git closed 2 years ago
Can you give me a more complete description on how I can reproduce the issue?
Here are my steps, thanks for looking at this.
I compared other projects I had (using visualteensy 1.2.0 & "clone local core into project" and noticed these extra files/folders.
Thanks, I'll have a look why Github Desktop stumbles over it. Anyway, the '.git folder' is the whole point of cloning the library. Deleting it renders the clone to a simply snapshot copy. Looks like you want to select Copy instead of clone?
The following applies if you really want to clone the core files into your project. If you want to copy them do as mentioned above.
I did a few experiments and can reproduce the issue you have with GitHub Desktop. If you clone the core libraries into a project which you want to upload to gitHub (or any other git server) later, you need to tell your project that it should treat the cloned cores folder as a git submodule. Unfortunately the git library I use can't currently do this automatically so there is a small manual step required:
1) Clone the core files into the project with VisualTeensy. This will first git-init your project and then add the Teensy core as git repository to it.
2) In VSC, open a terminal and type git submodule add https://github.com/paulstoffregen/cores ./cores
this will 'register' the cloned core library as submodule to the main repo
3) In Github Desktop choose File | Add local Repository and browse to your project folder. Don't forget to commit
Then, use the publish repository button to generate the repo in GitHub. In Github you will see that the cores folder is empty. Actually it simply links to the location it was cloned from originally. I.e. github.com/paulstoffregen/cores . When you clone your repo from Github it automatically grabs the core files from there
Hope that helps
I have to delete the .git and .github folders after cloning, so github desktop will commit my stuff. Otherwise, I get the error shown below. For v1.4.0
I also delete the .gitignore. Perhaps keywords.txt and readme.md should stay?