fetch
- Usage:
java gitlet.Main fetch [remote name] [remote branch name]
- Description: Brings down commits from the remote Gitlet repository into
the local Gitlet repository. Basically, this copies all commits and
blobs from the given
branch in the remote repository (that are not already in the current
repository) into a branch named
[remote name]/[remote branch name]
in the
local .gitlet
(just
as in real Git), changing [remote name]/[remote branch name]
to point
to the head commit (thus copying the contents of the branch from the remote
repository to the current one). This branch is created in the local
repository if it did not previously exist.
- Failure cases: If the remote Gitlet repository does not have the given
branch name, print the error message
That remote does not have that
branch.
If the remote .gitlet
directory does not
exist, print Remote directory not found.
- Dangerous? No