
| Line: 1 to 1 | ||||||||
|---|---|---|---|---|---|---|---|---|
Creating a Git Repo | ||||||||
| Changed: | ||||||||
| < < | Git repositories allow for many types of workflows, centralized or decentralized. Before creating your repo, decide which steps to follow:![]() | |||||||
| > > | Git repositories allow for many types of workflows, centralized or decentralized. Before creating your repo, decide which steps to follow:![]() | |||||||
Create A Local RepositoryIf you will be working primarily on a local machine, you may simply create a git repo by usingcd to change to the directory you wish to place under version control, then typing: | ||||||||
| Line: 28 to 28 | ||||||||
| ||||||||
| Added: | ||||||||
| > > | If you already have a repository that wasn't created with --shared=group, you can convert it by doing the following:
| |||||||
"Bare" repositoriesBy default, the shared repository has a working copy just like one on your local machine. git will complain if you do any remote operations that might make this working copy go out of sync, such as "git push origin master," with a message like the following: | ||||||||
| Line: 38 to 44 | ||||||||
| The solution is to make your shared repository a "bare" repository, with no working copy. The git FAQ has a good example of how to convert a non-"bare" repository to a "bare" one. For more information, see the description of "--bare" in the git-clone manpage or this stackoverflow thread. | ||||||||
| Added: | ||||||||
| > > | These instructions seem to sometimes convert a shared repository into a non-shared one, causing only one group member to be able to push; if you have this problem, you can correct it with the instructions at the end of the section above. | |||||||
| ||||||||