git clone [<username>@]<host>:</path/to/repository>
,git tag
,git checkout tags/tag
, with tag
the wanted tag,git update
.You may want to update a repository with a totally new set of files, that is:
This avoids problems with overwriting of existent files, which may be convenient when using a script.
This can be done with following procedure :
git clone --bare ...
(you should then only have a .git
directory in the repository),bare
entry in the .git/config
file to false
(can be automated with sed "s/bare = true/bare = false/g" -i .git/config
with GNU tools),git add -A
,commit
as usual,push
with --set-upstream origin master
options.