Updated: 01 February 2023
Initialize a repo with no working directory e.g. a shared repository. Developers can clone our-shared-project.git.
git init --bare <our-shared-project.git>
Change url of remote
git remote set-url origin new-url
Fetch one branch from a remote
git fetch <remote_name> <branch_name>
Rename remote
git remote rename from to
Remove remote
git remote remove temp-remote
Add a remote
git remote add origin git@github.com:User/UserRepo.git