Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
172 views
in Technique[技术] by (71.8m points)

git - Updating A Central Repository of Curriculum Exercises

I'm hosting some R/RStudio training sessions and I want to make my directory of programming exercises available to all users. However, I want to be able to update the exercises as we go along, and have the users be able to access those updated changes.

I'm seeking guidance in setting this up. Is git even the right solution for this? I don't expect my students to be comfortable with git other than clicking the Pull button when I announce updates to the curriculum.

On the one hand, I'd like to main read-only repository and have students copy files to a working directory. This is less than ideal, because there is more room for error.

On the other hand, if possible, I'd like to allow students to edit the documents directly in the main repository, and have the pull operation merge the updated questions/solutions into the work they've already done.

I've tried testing git pull --no-commit but that simply throws an error when the main file differs from the local file.

I've tried testing git stash; git pull; git stash pop, but the output stacks old on top of new, without merging in line. Which, again, is less than ideal.

question from:https://stackoverflow.com/questions/65832471/updating-a-central-repository-of-curriculum-exercises

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

It sounds to me like raw command-line git may be too much for you and your students, but if you use GitHub online, you get all this in a nice user-friendly interface. Additionally others can fork and create pull requests as you suggest.

https://github.com/


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...