Member-only story

How to selectively work with only a specific directory and its files in Git repository?

Bryant Jimin Son
4 min readAug 20, 2023

--

Way to work with selected directory in a git repository

As a Solutions Architect working in GitHub, I get requests from different customers for all different type of scenarios including various migrations, GitHub and Git product trainings, Copilot, etc. One time, a customer said that they are mainly consisted of team of Tableau developers, and they asked this question:

Is it possible to only checkout a specific directory/directories from GitHub and continue to work with that directory instead of checking out entire repository from GitHub?

This is perfectly a valid request as some developers would not want to concern with directories and files that other Tableau developers are working but they still want to use one single place to store everything but divide by directories instead of individual repositories.

However, as the way git is designed, the system values full git commit history and trees, not just blobs (files, contents, etc). This is because git stores everything as a “snapshot,” not as “delta.” If there is something that changes git history, it is possible that will affect everyone else who is using it.

Let’s take a look at this screenshot for a repository. In this repository, I have a number of different directories and different files. What if somebody only wants to…

--

--

Bryant Jimin Son
Bryant Jimin Son

Written by Bryant Jimin Son

A cloud practitioner talking about technology, travels & career tips. But I will sometimes cover financial advises and some random stuffs.

No responses yet