Overview
Teaching: 20 min
Exercises: 0 minQuestionsObjectives
- How can we backup repositories?
- How can we share repositories with others?
- How can we keep repositories in sync?
- What are different ways to make a copy of the entire repository?
- Be able to decide whether to divide work at the branch level or at the repository level.
c7f0e8bfc718be04525847fc7ac237f470add76e
).master
or main
.phd-printed
or paper-submitted
).There are two more ways to create “copies” of repositories into your user space:
Discussion/exercise
- Visit one of the repositories/projects that you have used recently and try to find out how many forks exist and where they are.
- In which situations it could be useful to start from a “template” repository by generating?
Key Points
git clone
copies everything: all commits and all branches.Branches on the remote appear as (read-only) local branches with a prefix, e.g.
origin/master
.We synchronize commits between local and remote with
git fetch
/git pull
andgit push
.Repositories that are shared online often synchronize via pull requests or merge requests.
Repositories that are forked or cloned do not automatically synchronize themselves.