Welcome to the Linux Foundation Forum!

[git] option --bare

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


  • coop
    coop Posts: 913


    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


Upcoming Training