git remote add [name] [url]
: Add a new remote repository.
git remote add upstream <https://github.com/otheruser/repo.git>
git remote remove [name]
: Remove a remote repository.
git remote remove upstream
git branch -r
: List remote branches.
git branch -r
git pull --rebase [remote] [branch]
: Fetch the remote branch and rebase the local branch onto it.
git pull --rebase origin main
git submodule add [url] [path]
: Add a submodule.
git submodule add <https://github.com/username/submodule.git> submodule
git submodule update --init --recursive
: Initialize, fetch, and checkout submodules.
git submodule update --init --recursive