-
Notifications
You must be signed in to change notification settings - Fork 921
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Issue Summary
When using this repository in GitHub Codespaces, users encounter git push
failures due to Git LFS not being pre-installed in the Codespaces environment at exercise2.
Problem Description
After completing the learning activities and attempting to push changes, users get the following error:
This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'pre-push' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').
Steps to Reproduce
- Fork this repository
- Open in GitHub Codespaces
- Complete the learning activities and make commits
- Run
git push
- Error occurs
Current Workaround
Users need to manually install Git LFS:
sudo apt update && sudo apt install -y git-lfs
git lfs install --force
git push
Suggested Solutions
Option 1: Add to devcontainer configuration
Add Git LFS installation to .devcontainer/devcontainer.json
:
{
"postCreateCommand": "sudo apt update && sudo apt install -y git-lfs && git lfs install"
}
Option 2: Update documentation
Add a troubleshooting section to the README explaining this issue and the workaround.
Option 3: Remove Git LFS if not needed
If Git LFS isn't essential for this learning repository, consider removing the LFS configuration to simplify the user experience.
Impact
This affects learners trying to complete the "Code with Codespaces" skill, potentially causing frustration when they can't push their completed work.
Environment
- GitHub Codespaces (Debian-based environment)
- Git LFS hooks are present but
git-lfs
command is not installed by default
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working