4 ms·
My solution using git: #!/bin/bash # run in the project root git add -A # track added files git commit # local commit git push # p
by riobard 17y ago
My solution using git:
#!/bin/bash
# run in the project root
git add -A # track added files
git commit # local commit
git push # push to remote bare repository
ssh REMOTE_HOST 'cd PROJECT_FOLDER; git pull' # expand a working folder from the remote bare repository; usually public www folder is contained there
extra benefits: two copies of complete history for backup local and remote
- cloudkj 17y agoHow do you ensure that the .git directory isn't accessible?
- riobard 17y agono safeguard whatsoever. i'm the only user so ... :)
- Pistos2 17y agoIn my case, it's never part of the publicly-served tree. public/ is a subdir within the repo.
- riobard 17y agoI have a public www folder too if I only want to open up part of the whole repo. But since there is usually no sensitive data in a public-facing repo anyway, I don't care if people can access .git or not. They may clone it if they want! :D