Posts

Showing posts from June, 2014

How to create a new repository on the command line in Github

Image
On your Git Hub profile click “new repository” brief description, choose the “public” repository option, and click “create repository”. 1)In the command line–make sure you cd into your folder–and type:  $ git init This initializes a git repository in your project 2)Next check if a file called READEME.rdoc exists in your directory:  $ ls README.rdoc If the file doesn’t exist, create it by typing:  $ touch README.rdoc 3)Then type:  $ git status This will list out all the files in your working directory. 4)Then type:  $ git add .  OR  $ git add filename.extension This adds all of your files & changes. 5)Then type:  $ git commit -m "first commit" This commits all of your files, adding the message “first commit” 6)Next type:  $ git remote add origin https://github.com/username/rails-girls.git This creates a remote, or connection, named “origin” pointing at the GitHub repository you just  created. 7)T