Reputation: 19825
I want to backup git repos using this SO answer: Backup a GitHub repository
git clone --mirror git://github.com/user/project.git
git fetch
The only difference is I am using git fetch
instead of git remote update
Are there any drawback of the two commands? (from the complete backup point of view, e.g. backup all tags, branches)
Upvotes: 3
Views: 445
Reputation: 4577
Basically, unless you setup a specific configuration, git remote updates
runs a git fetch
against all your remotes.
The man page states
update
Fetch updates for a named set of remotes in the repository as defined
by remotes.<group>. If a named group is not specified on the command
line, the configuration parameter remotes.default will be used; if
remotes.default is not defined, all remotes which do not have the
configuration parameter remote.<name>.skipDefaultUpdate set to true
will be updated. (See git-config[1]).
In your case, if you didn't define any remotes.<group>
nor a remotes.default
, and if your only remote is github, running git remote update
or git fetch
is completely equivalent.
Upvotes: 1