Git mirror a repo to specific branch
问题 our company try to fork a github project to our own git server,then we can add our own features on it. We just want to checkout a specific branch, and keep all branches and tags up to this branch, then copy(mirror ?) to our git server. 回答1: Create the repo on your server. Elsewhere (not in the server repo), clone just the branch with git clone --single-branch --branch branch_name github_repo_url Tell git where your repo is: git remote add mine your_repo_url Then, push the branch to your repo