# Using digital source material > Use the source, Luke > > -- a [pun][UTSL] on Obi-Wan Kenobi quote in Star Wars ## Special strings NB! This documentation uses special strings which you may want to adapt for your local setup: githost: source.example.org gitshellhost: git.example.org ## Git Digital source material is tracked with git. Git is a version control system - a repository for historic versions of file contents of a folder. ## Create To turn a folder into a git repository, go into the folder, and initialize its git database: ```shell git init ``` ## Save To "take a snapshot" of one of more files for git archival, first mark which files are involved and then archive their (changes to) content: ```shell git add foo bar git add baz git commit -m "Update foo bar, and add baz." ``` Alternatively you can update (but not add) in one go: ```shell git commit -m "Update foo bar." foo bar ``` ## Share To collaborate on a shared git repository, first create a local copy from the shared location: ```shell git clone git.example.org:/srv/git/source.example.org/example.git ``` Then from time to time syncronize, first fetch eventual updates from others and then push your local changes: ```shell git pull git push ``` ### Publish To publish a git repository initially created locally, first create a new empty git publicly, then tell your local git where its new origin will be, and finally push your local git into its new public location: ```shell ssh git.example.org git init --bare --shared /srv/git/source.example.org/example.git git remote add origin git.example.org:/srv/git/source.example.org/example.git git push --set-upstream origin master ``` ## See also * [Flight rules for Git] [Flight rules for Git]: "A guide for programmers using Git about what to do when things go wrong" ## References * [Source of this document][source] [UTSL]: [source]: "Digital source material"