How to keep upstream settings on my fork?

I have a fork of a project I want to contribute. I want to keep my fork up to date, so I need to git fetch upstream. Though I noticed that every time I clone my fork on a new machine I have to setup upstream again (git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git). Why is that and how to make this automatic, so that every time I clone my fork upstream is already set up?

As far as I know it’s just a “that’s how git works” kind of thing. You could make a cli alias that clones and sets the upstream but then you have to set that up on new machines too.

Actually it can be done automatically, but instead cloning through the console you need to use GitHub Desktop. It will setup upstream straight away :slight_smile: