User Tools

Site Tools



  • To retrieve a repository : git clone [<username>@]<host>:</path/to/repository>,
  • to update a repository : git update.

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 made with 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.
computing/tools/git.txt · Last modified: Fri Jun 16 08:54:25 2017 (16/06/17) by Claude SIMON