'git'

Misc

  • To retrieve a repository : git clone [<username>@]<host>:</path/to/repository>,
  • tags related commands:
    • to list the tags of a repository : git tag,
    • to get the content of a repository at a given tag:
      • retrieve the repository with clone as indicated above,
      • git checkout tags/tag, with tag the wanted tag,
  • to update a repository : git update.

Updating a repository with a new bunch of files

You may want to update a repository with a totally new set of files, that is:

  • retrieve the repository without the files,
  • put all the needed files in the copy of the repository,
  • update the repository to match the copy.

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),
  • set the 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),
  • put the files,
  • git add -A,
  • commit as usual,
  • push with --set-upstream origin master options.