github / gh-classroom

GitHub Classroom CLI Extension is a powerful and easy-to-use command line tool that enhances the functionality of the GitHub CLI, specifically tailored for educators using GitHub Classroom.
MIT License
82 stars 14 forks source link

pull student-repos refusing to sync #51

Closed pmcstjean closed 11 months ago

pmcstjean commented 11 months ago

Been trying the new pull feature for student repos. It works fine except for some students for whom I opened their project (Pycharm) and did a manual push with some code and comments. Now after a while I try to pull new changes for everyone but it's not letting me because I have some xml project file not commited (untracked). A normal git pull would work fine but using the gh extension gives me this error :

Pulling repo: failed to run gh: refusing to sync due to uncommitted/untracked local changes tip: use git stash --all before retrying the sync and run git stash pop afterwards . error: exit status 1

is there a way to circumvent this without having to do a manual intervenation in every student projects ?

pmcstjean commented 11 months ago

i'm using v0.1.12

RyanHecht commented 11 months ago

I think the best way forward might be to push a .gitignore with the xml project file to all the student repos! You could potentially script this step to make it easier; and for all future assignments you can add this .gitignore to the starter code repository.