Github file displays

I have been uploading all the coding projects I have done in free code camp and from youtube (with referencing) into a Github codespace into a repository I have created. I have one issue. When I created the repository, I uploaded three folders which is displayed when I view my repository as a external viewer. However, as I uploaded newer files and folders, they do not show in my repository when I view it as an external viewer. I can only see it when I open my codespace. But I would like people who view my github account to view all my projects. How do I do that?

I have asked gemini, chat gpt, websites, etc. but all the commands I tried from file merges, changing terminals, putting all folders into the same terminal were to no avail, and only the three originally uploaded folders remained visible to external viewers. Is there any way you guys can help me out?

In the image where I am in my codespace, the folders highlighted in green are the ones that appear in my repository as I view as an external viewer but the ones highlighted in orange are the ones that do not show up in the repository as an external viewer and can only be seen if I enter my codespace.

Thank you in advance for anyone out there that can help me out here!

Have you tried using git status command in terminal in repository folder?


I think I did before but this is what I get.

Hey @Trevski

Help me with answering these questions:

  1. Did you upload the 3 green folders using the git terminal or from GitHub manually?
  2. Check if your Git and GitHub are connected or not.

About your Terminal screenshot try to read and implement this to resolve the safe directory problem.

  1. I’m not sure but I uploaded the 3 original folders by right clicking and then selecting upload. I did this through visual studio code which was on git hub as my platform for my codespace. I did the same with the other folders, but only long after the repository was created.

  2. I googled how to connect but I’m still not sure so the output is shown in the picture below (I first entered the command from the stackoverflow hyperlink you attached which made me a ‘master’? and then I did the check on whether my git and git hub are connected.

I’m also new to github so I am a bit blur with how the repository, git and github works.

Okay then you uploaded them manually without Git and It seems (according to your screenshots) your local Git isn’t connected to your GitHub account.

I suggest you follow these steps:

  1. Try to link your Git and GitHub together (watch this video it’s good you can even google it to know how to do it) – don’t go to the next step until you are sure they are connected even for certainty try to build another repo and examine the connection there. (Notice: your username and email must be the same in Git as in GitHub )
  2. After step 1 has been done now in your local machine do this:
    Be sure you have the vs code on the local computer
  $ git clone  <the repo link>
  $ cd <folder-name>
  $ code .

Now you can add the 3 folders (with orange color in the snapshots) to this directory and push them.

I hope I explained it good
If you need more help let me know

Best,

1 Like

Hey @aminalizadeh, I am three-fourths through the video you sent in the hyperlink but I am stuck at the editing mystyle.css.

I’m doing this on powershell, which does not have the ‘$’ at the beginning of each line but it still works until this point. I am not sure what is the alternative command to ‘vi’

@Trevski Good job

Just consider this try to use just one command line app and only one text editor I think you are using different tools and this is the root reason for your problems

I don’t know your operating system but my suggestion is:

  1. If it’s Windows try to use Powershell only
  2. If it’s Mac or GNU/Linux try to use Terminal only

for the text editor try to use VS code

About the screenshot and the issue you faced, the reason is you want to open the mystyle.css file with vi text editor(but you didn’t install it on your machine and it caused the not recognized error trying to open your folder and files of the codebase (project) with vs code by using code mystyle.css

If you need more help let me know

Best,

Hey @aminalizadeh , I’m starting to get a grip on how these things work so I will start adding uniformity by using powershell for windows and vs code for a text editor (does that mean coding?).

For the mystyle.css, I came across this website: VIM text editor (I can’t attach hyperlinks)

Is it the site to download the vi text editor? I downloaded the first executable file from the image shown below:

Before I allowed the file to make changes to my computer, I checked the publisher but it says it was unknown so I am a bit hesitant in allowing it to make changes to my computer, is it safe to allow?

@Trevski I understand your status

Vim is a terminal-based text editor and it’s not beginner-friendly (I suggest you stick to the vs code) It’s only keyboard-based and you can’t edit your text files using the mouse.

If you want to edit any text file (HTML, CSS, JS, …) only use vs code there are lots of free contents on how to use it on the internet

But if you decide to keep going with Vim this video is good for solving your installation issue.

If you need more help let me know

Best,

Hey @aminalizadeh I realised that the tutorial was using css as an example to push your data into github so I won’t be needing it.

I connected git to github and now, I entered the code you put in step 2. However, I am a bit confused.


I did this after that

What do I do now? do I push it? is it ‘git push origin’?

And do I repeat the three lines of code again for the other three folders or do I just keep adding cd folder name ?

@Trevski I’m Happy to see you connected Git and GitHub plus I see you cloned the repo successfully Great!

when you run the code . it means to open the current directory inside the vs code IDE
you have to see the vs code opens automatically

After opening the vs code follow this tutorial to push your custom files or folders (try to understand the push - commit - add commands of git

About your last question, you have a repo (Personal-Coding_projects—Cybersecurity) and you already cloned it open it inside the vs code and drag and drop the projects that you want to add (it’s easy to drag and drop) then push them to your repository on GitHub (you don’t have to repeat any line of code one push command is enough but before push you have to first add it then commit it then you can push them. (follow the tutorial I shared)

If you need more help let me know

Best,

1 Like

HI @aminalizadeh , I watched the tutorial you attached in the link and I followed it. On my side I mistakenly pushed the folder into my master branch in my repository but it is not the default branch.

My default branch is: codespace-super-system-w4r9p95xqqx3g9g7. However, when I put it into git push origin “branch name”. This is the error message shown below. This branch was the branch I was given when I first made this repository.


Also, I would like to push the folder as a whole instead of pushing all the individual files as when it is pushed into Git Hub, it only shows the files laying scattered without being in a folder. Is there a command for it like git init folder? I think I can find this out on my own if it is more convenient for you but I am still confused about the branch thing as the branch name I put is the same as the branch name displayed on github.

@Trevski I see you resolved your issue
happy coding

Hi @aminalizadeh , thank you so much for helping me out, I was struggling with this for such a long time. I greatly appreciate your help!