Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # http://serverfault.com/questions/249792/use-git-for-multiple-server-configuration-files
- $ su -
- $ export GIT_DISCOVERY_ACROSS_FILESYSTEM=1 # maybe in .bashrc
- $ cd /
- $ git init # init a new repo
- # filepermissions: follow http://basilabbas.blogspot.de/2011/10/tracking-etc-directory-using-git.html
- $ echo "*" > .gitignore # ignore * at first
- $ git add --force .gitignore # add a file
- # add more files
- $ for f in $(cat /root/bin/backup.files); do git add --force $f ; done
- $ git commit -m "init" # commit them
- $ git remote add origin [URL]/server.git
- $ git branch --set-upstream master origin/master
- $ git push # push them to server
- # list all files under versioning:
- $ git ls-tree -r master --full-tree --name-only
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement