Separating Development and Submission Repositories for CS50 Wiki
While preparing my CS50 Web Programming Wiki project for submission, I ran into an important Git workflow issue that taught me a valuable lesson about repository isolation
Background
For CS50 projects, submissions must be pushed to a specific branch structure such as: web50/projects/2020/x/wiki, under the me50/USERNAME repository.
At the same time, I was maintaining a separate personal repository to track my learning progress, lecture notes, and projects.
Initially, both my development repository and submission repository existed unser the same parent workspace directory.
The problem
I did the following inside the submission repository.
git checkout -b web50/projects/2020/x/wiki
Since git branches inherit current working tree, the newly created wiki branch still contained files from the previous Search(Project 0) submission.
To comply with CS50's submission requirement, I attempted to remove those files and replace them with the Wiki project files.
However, because my development and submission workflows were not clearly separated, this led to confusion and accidental file loss in my working directories.
Root cause Analysis
The issue was not a Git bug, but a workflow design problem.
- Git tracks files relative to the repository root.
- Creating a new branch does not create a clean directory.
- Mixing development work and submission work within overlapping directory structure significantly increases the risk of destructive operations(git add -A, file deletions...)
The Solution
I restructured my workspace to physically separate responsibilities
C:\Users\USERNAME\CS50_Submissions\USERNAME\.git(Submission-only, me50 repository)
C:\Users\USERNAME\Webworkspace\CS50-Web-Programming..\.git(Personal development repository)
Key decisions
- Development work happens only in my personal repository
- Submission work happens only in CS50_Submissions.
- Files are copied from development -> Submission
- Submission branches are created only inside the me50 repository.
Takeaways
- Git branches inherit the working tree. They do not start clean.
- Submission repositories should be treated as disposable, isolated environments.
- Physical directory separation is a simple but powerful way to prevent workflow mistakes.
- A clear Git workflow is just as important as correct code.
This experience significantly improved my understanding of Git and repository design beyond basic command usage.

댓글 없음:
댓글 쓰기