Git FAQs: Difference between revisions

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…'
 
No edit summary
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.

  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