git

phase 1st:

  in order to do anything in git, you must have a repository which is where git stores the data for the snaphshots you are saving.

two common ways to get a git repository:

   initialize a new one from an existing directory , such as a new project or project new to source control.

  the second way is to clone one from a pulbic git repository . ( if you wanted a copy or wanted to work with someone on a project.)

 

now i will cover the first way ,then the second way

  turn to a working directory:    

    such as :    cd  konnichiwa      ( there are two files : README     hello.rb)

          ls

            README   hello.rb

          then  run the command:        git init

   this command will create a new subdirectory  :  .git ,      (this directory is your Git repository where all the data of your project snapshots are stored.)

   after these steps . now you can start snapshotting your project.

 

Second way to create git repository:   git clone    (copy a git repository so you can add to it)

   run command:    git  clone [url]                (the url reffers to the projrct which you want to copy.)

 

 

 

 

posted @ 2013-10-03 16:59  mayer21548  阅读(218)  评论(0)    收藏  举报