Gitセットと使用


参考URL:http://kylecordes.com/2008/git-windows-go
Global setup:
 Set up git
  git config --global user.name "Your Name"
  git config --global user.email [email protected]
      
Next steps:
  mkdir ctsaProject
  cd ctsaProject
  git init
  touch README
  git add README
  git commit -m 'first commit'
  git remote add origin [email protected]:xxx/ctsaProject.git
  git push -u origin master
      
Existing Gig Repo
  cd existing_git_repo
  git remote add origin [email protected]:xxx/ctsaProject.git
  git push -u origin master
      
Importing a Subversion Repo?
  Check out the guide for step by step instructions.
      
When you're done:
  Continue
 
 
////////////////////////////////////
  GitHub  :
1、  GitHub   xxx ,    new-project  Repository 

2、  Git   (Linux)
#yum install git git-gui

3、      ,      push  GitHub 
#ssh-keygen -t rsa -C "[email protected]"
4、 .ssh/id_rsa.pub   GitHub  
Git_Github     _ 1   

5、    ,  ssh     
# eval `ssh-agent`
# ssh-add
(  passphrase)

6、       GitHub
#ssh [email protected]
      ,  
ERROR: Hi xxx! You've successfully authenticated, but GitHub does not provide shell access
Connection to github.com closed.

7、  Git      
# git config --global user.name "xxx"
# git config --global user.email [email protected]

8、          
# mkdir new-project
# cd new-project
# git init
# touch README
# git add README
# git commit -m 'first commit'
         origin
#  git remote add origin [email protected]:xxx/new-project.git   
       ,       master
# git push origin master  

GitHub         , http://github.com/xxx/new-project

9.     
# vi README
  commit    
# git commit -a     
     
# git push origin master

10.        
#git branch        master
#git branch new-feature      
# git checkout new-feature       
# vi page_cache.inc.php
# git add page_cache.inc.php
Commit    GIT
# git commit -a -m "added initial version of page cache"
        
# git push origin new-feature

  new-feature     ,        master
#git checkout master
#git merge new-feature
#git branch
#git push 
 master     new-feature    

    GitHub    "Switch Branches"      :

Git_Github     _ 2   

GitHub          ,         (Network):

Git_Github     _ 3