Git /
Setting up a Git repositoryOnce you have configured Git, you can start creating a repository. There are a few ways to do that, depending on your situation. Starting from scratchIf you have not yet started to work, or if you are the first person to use Git to track changes on something, setting up your repository is dead easy. First create the directory in which you want to work, then, inside that repository:
will initialize your repository. You can then create or copy the files you want to work on, and start using git?. Cloning a repositoryIf you already have started to work with version control, or are joining someone who is, and would now like to work on a new computer, you need to clone the original repository. This will automatically copy all the files contained in the original directory, as well as the information about the origin, so that the new repository can access to original one. This is accomplished through git clone origin target ex.: git clone mycolleague where
Cloning in a non-empty directoryAlthough this looks like a messy idea at first, it can be useful to keep scripts up to date in a certain directory that also has other things, for example. In this case, the way to do things is a bit different: You create a repository, add a new origin to it, fetch? the remote repository's information and get the files from it. This looks like: git init git remote add origin username@domain:Path/To/Repo git fetch git checkout -t origin/master |