- add a remote repo:
-
command:
-
- git remote add
-
- git fetch
-
//if you are not on your local repos default branch then checkout to it using the command:
-
- git checkout <local repo default branch name(usually it is master or main)>
-
- git merge <remote repo name from step 1>/
-
// doing till step 4 will only sync the local forked repo with the original repo, to push changes to your remote repo, use the command:
-
- git push <the remote name you want to push(generally if you cloned a repo, the default name is origin, unless and until you added remote manually or changed it later)>
-