Github Workflow (Classwork)

Hey everyone, so I’m in a “Web Backend Development Class” at my university and my professor wants us to clone his repository, and copy it and paste it into our own repository and push it to our own once finished for a grade. I feel like I could very easily organize this by using either a Windows Batch workflow or Mac Terminal workflow to check his repository for file updates and automatically add the new files into my repository without losing my previous edits. Github is new to me, so please correct me if I’m misunderstanding usage. I’ve created my own repository ( so I am okay in the creation, syncing and editing aspect, I just want to know how to automate changing and syncing without losing my work.

If I’m understanding what it is you’re trying to do correctly, then I have a script that I use for updating forks. It’s kind of long, mostly because it is configurable. The part that does the work is equivalent to:

git pull --ff-only [origin remote] master
git push [personal remote] master

The --ff-only option prevents the pull if you’ve made changes to the master branch since you last pulled from the origin repository. It sounds like you’re making changes to master though, so you may want to remove that option. If you do this, you’ll need to merge the changes and resolve any conflicts that arise.

Let us know if you have any more questions!