Help with uploading to GitHub

I tried to upload/add these folders/files by highlighting/choosing them- see attached image:
fileList

but it didn’t upload all that I highlighted. No folders appeared in the repository and not all files.

I look forward to being enlightened as to why it all hasn’t been moved into the repository

How are you using git?
Are you using the terminal or some other methods?

1 Like

AFAIK dot files (._macos) is “hidden” and cannot be copied. But you can cheat by zipping all before upload and extract them later. Then the hidden fields will be there when unzipping…

Thanks for the replies.
I uploaded the zip file, but don’t know how to extract the files.

So, I proceeded with trying to add files to a repository.
I’ve created a repository and attempted to clone the repository to my local computer,
then I have moved the folder, that I want to upload to GitHub, into the local directory that was created when I attempted to clone the repository.

And now I see this (image):

what do I do next?

It looks like you’re using the GitHub Desktop app. Is that right? So if I’ve got this right, you firstly set up a repo on gitHub itself? then you cloned it to your local computer? Then you placed new files in that repo locally? If so, you should see an option to push those new local files to the remote repository.

My question is, why do you want the ._ files to be included? I’m just curious. From what I remembered, these are just “digital” copies of the actual files. I wouldn’t put these files on Github. I would upload the actual files, not their ._ equivalent. Also, hidden files aren’t excluded when you push code/files to any Git solution unless you explicitly tell Git to ignore the hidden files. That’s why you can upload things like .htaccess, .gitignore, .gitattribute, .DS_Store, etc to your Git solution.

You would normally check to make sure you’re on the right branch you want to push to. Then write your commit message and then push your commit. In the terminal, it would follow these steps.

  1. git rev-parse --abbrev-ref HEAD (Check the current branch you’re on, you don’t want to push to master unless you really have to or in case you’ve got some kind of branch protection policy in place. You don’t want to push to a branch you don’t have access to.)
    A. git checkout -b {BRANCH_NAME} or git switch {BRANCH_NAME}. The checkout option creates a local branch if you don’t have a local branch with that name and it’ll switch to that branch. The switch option assumes you have a local branch created under that name already.
  2. git add . (which means to add everything in the folder, this will add only files deleted, modified, or added that are new to the commit)
  3. git commit -m "Message here" (appends a message to your commit, in your case, it would be at this step from your image above you posted)
  4. git push or depending on your workflow, you may need to push to upstream first before you can push to the origin branch.