Skip to content

Conversation

@StarTrooper08
Copy link
Collaborator

This update hides .git dir in vscode file explorer and disables git features inside devcontainer.

PR for Issue number : #262

@hturner
Copy link
Member

hturner commented Aug 2, 2025

The problem is not so much users seeing the the .git folder in VS Code Explorer, but seeing the git repo in the Source Control view, which is confusing and distracting when they are only interested in the SVN repo that they check out from svn.r-project.org. That is why I think we should use

"git.ignoredRepositories": [
    "."
]

If we give ownership of .git to root, are we able to use git commands from the terminal (maybe with sudo?). That could be sufficient for us as developers of the container (personally I would turn off the git.ignoredRepositories setting as I like to use the Source Control view, but that could be a personal choice).

Hiding things in VS Code explorer that the user does not need to see is also useful and can be done at the same time. I think we can hide:

.devcontainer
.git
.gitignore
.gitpod.Dockerfile
.gitpod.yml
.markdownlint-cli2.yaml
.pre-commit-config.yaml
Dockerfile
mkdocs.yml
scripts

reinstall-cmake.sh can be deleted, we are not using it anymore.

scripts should probably be renamed as the user might try to create their own scripts directory, perhaps for R scripts they are working on. Maybe we should rename it as .scripts (with a dot) or something like zzz. Maybe r-dev-env-scripts? Whatever we choose we'll need to update the file paths in our scripts.

Hiding these files will make the container much cleaner for users, but again as developers we can delete the whole files.exclude setting, or parts of it, to work on those files. It would be good to add a short section to the docs explaining this, to remind us and inform future contributors.

@StarTrooper08
Copy link
Collaborator Author

Hiding these files will make the container much cleaner for users, but again as developers we can delete the whole files.exclude setting, or parts of it, to work on those files. It would be good to add a short section to the docs explaining this, to remind us and inform future contributors.

When we are working on r-dev-env repo locally and making changes that time we will be able to see config files in project dir. The files-exclude feature will only work when we use r-dev-container/codespaces.

@StarTrooper08 StarTrooper08 self-assigned this Aug 3, 2025
@hturner
Copy link
Member

hturner commented Aug 6, 2025

Hiding these files will make the container much cleaner for users, but again as developers we can delete the whole files.exclude setting, or parts of it, to work on those files. It would be good to add a short section to the docs explaining this, to remind us and inform future contributors.

When we are working on r-dev-env repo locally and making changes that time we will be able to see config files in project dir. The files-exclude feature will only work when we use r-dev-container/codespaces.

Ah okay, even easier then.

@StarTrooper08
Copy link
Collaborator Author

Git ignore

image

Git ignore with File Exclude

image

@hturner
Copy link
Member

hturner commented Aug 8, 2025

Looking good. We should also exclude the .github folder.

Then we still need to rename scripts and update the path where that occurs (scripts/localscript.sh, .gitpod.yml, .devcontainer/devcontainer.json and .github/workflows/optimize-docs-images.yml). Thinking some more, I think utils would be a good name and maybe as the explorer is much tidier with the changes here, we can keep that utils folder visible.

@StarTrooper08
Copy link
Collaborator Author

Update :

  1. Folder exclude
  2. Removed reinstall-cmake file

Will create different PR for script directory name change.

scripts -> utils

@StarTrooper08
Copy link
Collaborator Author

Tested on codespaces, its working as expected

image

@hturner hturner merged commit 4024193 into devel Aug 8, 2025
1 check passed
@hturner hturner deleted the hide-git branch August 8, 2025 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants