Unable to open folders in GitHub - github

I pushed a commit on my remote GitHub repo and it appears like this:
In the above screenshot, the top 2 directories appear with a special symbol and strangely I can't click on it or open it. Whereas I can click and open other folder. What could be the reason for that?

The icon is for submodules. Git also doesn't track folders as such. Do you have another .git inside that folder where you have initialised git by mistake?
More verbose explanation of submodules.
https://stackoverflow.com/a/62057615/12040634

Related

How to remove or modify a repository from vscode

I just added my repository to vscode source control (using the Initialize repository button) and it now says I have 1800 changes. In Github Desktop it correctly shows two changed files. What should I do?
Should I remove the repository from vscode and how and then readd it back in? Is there a way to check where vscode is getting the repository? Maybe it is checking the wrong directory? Or maybe it is correct and github Desktop is incorrect?
vscode:
github desktop:
Note:
My folder that is open in vscode is a subfolder of the main repository.
Example:
/mygitproject
/mygitproject/workingfolderinvscode
Before:
Update:
Restarting vscode popped up this message:
Closed the project and opened the parent folder and got the same message mentioned above. This time some folders and files are unchanged and others are untracked. Adding right side of file explorer (screenshot below). Actually, on opening the folders I see that all the files all untracked and now the folders show untracked.
Update:
I've opened the source control view now, after opening up the parent branch and I see two repositories listed. The top one shows the correct number of changes and the bottom one the incorrect.
UPDATE:
It looks like if I right click on the name of the repository I get a few options including, "Close Repository".
I'm going to close the repository that shows as the subdirectory and keep the repository that includes the projectd from it's root directory.
Great success!
It is showing up correctly.
My guess is, your VSCODE is showing all the files in the main directory that has changed. Not only the ones in your subdirectory. Gis status can give more details about.
But in the source control tab of VSCode you can select the files you want to commit and push if necessary.
Apparently, vscode did not like that I had a sub folder open instead of the root folder (the one with git folder).
I then opened the folder that had the git folder in it.
It then showed two repositories.
To remove the first repository, I right clicked on the repository name in the source control panel and chose, "Close repository".
It now shows the correct information.

unfamiliar icon in github

Hi I'm really confused about this situation.
Here is the img
What is the meaning of the icon in front of the champ and cham_teleop icon?
I cannot open them on github and I cannot commit any changes I made in those two repos.
I'm always new to GitHub and not too familiar using this tool for nearly 2 years.
Any help?
Check if it is a gitlink, that is a nested Git repository folder.
That happens when you add a folder which has its own .git subfolder: the parent rpeository record that folder, but not its content (since it is a Git repository)

Creating new git repository, can't add directory

I am about to throw my laptop through a wall, and am hoping for help before reaching that point. For reference, I am following these instructions exactly - https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/.
I have a directory ".../path/thisdir". Inside of thisdir are (1) a file called Demo.R and (2) a directory called sportVU. sportVU is a directory with ~15 files in it.
When I follow the instructions in that link, my github repo looks like this:
https://github.com/NicholasCanova/packageSportVU
Notice that the sportVU directory link cannot be clicked in github, and when I download the repo, sportVU is an empty folder. Why is this happening? This shouldn't be so tough.
EDIT: this is what the repo looks like in my local machine, I'm 100% sure it's not empty:
It could be that you have two .git folder in your directory. View hidden folders to see.
Similar questions:
What does a grey icon in remote GitHub mean
Why can I not open my folder in GitHub?
Since Git doesn't store empty folders the steps you should follow exactly are:
Delete the old repo and start again following exactly my steps.
git clone <repo url>
Inside the folder of the cloned repo create a directory manually and name it as you want i.e sportVU.
Drag and Drop all the files you want in the sportVU direcrory.
cd to Myrepo/sportVU and type git add *
type git commit -m "added some files"
git push -u origin master.
and you should be all set

Publishing to github results in an empty repository

I am new to git. I downloaded the desktop version (for Windows). I dragged the folder containing my project into the big window, "Get started by adding a repository." All the files showed up in the left window. Then I clicked on "Publish Repository". It then shows 143 files have changed, with 0 unsynced.
But when I go to my account on the git website, the repository is empty. The only files in it are .gitattributes and .gitignore. The whole idea here is that I want to share this project with other people.
Help out a git newbie and explain how I get the entire solution into git?
Thanks!
As you already have the remote repository at GitHub, you should use the clone option first to clone your repository locally.
This will create a folder (your repository clone) on the default location containing those two files.
Then you can copy your project files to this folder and try to sync again.

Add new folder with files to github

Probably one simple question. I pushed my first project to github. I've done it with Eclipse with EGit plugin. I've clicked on a project, chose to push remote and uploaded it to git. There I have created readme file online so the structure looks like this:
Git
-- AppFolder
------srcFolder
------libsFolder
------resFolder
------etc etc
-- Readme.md
I have one other folder with screenshots of the app which I would like to have outside my app folder. Something like this:
Git
-- AppFolder
------srcFolder
------libsFolder
------resFolder
------etc etc
-- Readme.md
-- ScreenshotsFolder
------screenshot1
------screenshot2
------etc etc
How can I accomplish that? I don't want to put that folder with screenshots to AppFolder. Thank you.
Locally, just create the ScreenshotsFolder in the same directory level as AppsFolder and README.md.
Then, git add ScreenshotsFolder will add the folder and all of its content (really, all content that is not in your .gitignore file if you have one).
Next just git commit then git push remote_repo remote_branch (ex: git push origin master).
If you aren't doing this via the command line, I'm sure the EGit plugin has some option to add the ScreenshotsFolder and do a commit then push...haven't used EGit myself, though. The steps are the same either way, just a different interface.
Are the files intended to be committed? If not, you could just .gitignore that directory.
edit: if the files are meant to be committed, why can't you just add and commit them like normal, but in new directory?