2011年12月21日 星期三

Google code project git initial handling

In general case of some of existing code:
1. In your setup page : https://code.google.com/hosting/settings

  1. get your password
  2. Check your user preference like below, and save it:
    Security  
2. Check in your code : (below, work on windows XP)

  1. change to the directory to where your code exist
  2. initial git environment, run following command
    • git init
    • git add
    • git commit -a -m "Initial commit"
  3. create window environment data to have right to push code
    1. create an environment variable %HOME%, and set it to your project path
    2. create a file, named _netrc, and add contain below
      machine code.google.com
      login your_account@gmail.com
      password your_password_get_from_step_1
  4. commit/push your code to your remote google code project repository
    • git remote add origin https://code.google.com/p/your_project_name/
    • git push origin --all

沒有留言: