Difference between revisions of "Git FAQs"
From Genome Analysis Wiki
Jump to navigationJump to search (Created page with 'Its easy to turn an already existing directory into its own repository. # cd into your directory. # Tell git to create a repository: #* <code>git init</code> # Add all your file…') |
|||
Line 9: | Line 9: | ||
#* <code>git status</code> | #* <code>git status</code> | ||
# Remove any undesired files (if necessary): | # Remove any undesired files (if necessary): | ||
− | #* <code>git reset HEAD ''filename1 filename2'' | + | #* <code>git reset HEAD ''filename1 filename2''</code> |
# Commit the files: | # Commit the files: | ||
#* <code>git commit -m ''Initialize the repository with all the files''</code> | #* <code>git commit -m ''Initialize the repository with all the files''</code> |
Revision as of 18:00, 14 July 2011
Its easy to turn an already existing directory into its own repository.
- cd into your directory.
- Tell git to create a repository:
git init
- Add all your files to the repository:
git add .
- Check that you didn't add any undesired files:
git status
- Remove any undesired files (if necessary):
git reset HEAD filename1 filename2
- Commit the files:
git commit -m Initialize the repository with all the files
Follow this link if you want to create a remote bare Git repository for this repository to push to/pull from