top | item 47101623

(no title)

pwdisswordfishy | 8 days ago

> You can’t push changes to a non-bare repo – if you try, Git will reject your push.

Sure you can. If the repo has branch foo checked out, but you're changing branch bar, it will happily let you push to bar (or bar->baz). And even if both are working with the same branch, whether or not you get a warning or it's accepted or rejected is controlled by 'receive.denyCurrentBranch'.

> Because nobody can “work” inside a bare repo, it’s always safe to receive pushes from other locations

Mmm... it's "safe" depending on what you're pushing and what's on the other end, which is no different from trying to push to a non-bare repo.

discuss

order

tonymet|8 days ago

This is one of gits best features . SSH deploys with offline remote version tracking

fragmede|8 days ago

GitHub having a connection of ssh public keys is another feature that's really neat. You can give someone access to your server without having to give them a password somehow.