Git FAQs

From Genome Analysis Wiki
Revision as of 18:00, 14 July 2011 by Mktrost (talk | contribs) (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…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Its easy to turn an already existing directory into its own repository.

  1. cd into your directory.
  2. Tell git to create a repository:
    • git init
  3. Add all your files to the repository:
    • git add .
  4. Check that you didn't add any undesired files:
    • git status
  5. Remove any undesired files (if necessary):
    • git reset HEAD filename1 filename2
  6. 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