Using Git Example
From Genome Analysis Wiki
Jump to navigationJump to searchClone Pre Existing Repository
Create a New Repository
Create the Bare Repository
These steps will create a new bare repository called learningGit in ~/code/learnGit/bareRepo/.
- Create the containing directory
- Go to the correct directory
- Create a new bare repository
- Move into the new repository
- Look at the contents of the bare repository
mkdir -p ~/code/learnGit/bareRepo/ cd ~/code/learnGit/bareRepo/ git init --bare --shared learningGit cd learningGit ls
Add the first files
- Create a working directory
- Move to the appropriate directory
- Clone the initial repository
- Move into the working directory
- Look at the contents
cd ~/code/learnGit git clone ~/code/learnGit/bareRepo/learningGit cd learningGit ls -a