Welcome to the Linux Foundation Forum!

[git] option --bare

How to pull and push between bare repositories, there are no files?

Comments

  • coop
    coop Posts: 916

    https://www.saintsjd.com/2011/01/what-is-a-bare-git-repository/

    Note that any time you push and pull working files are not directly the object. i.e., you can do even

    rm -rf *
    (that leaves .git)
    and do pushes and pulls. You can always get your working files back with git reset --hard.

    A bare repo is somewhat different as I believe you don't need the .git directory, the stuff goes in the main directory,
    but it exists purely for push/pull, not actual editing. This article should help to explain more.

  • Thank you for the link, it's much clearer now

Categories

Upcoming Training