1.Setting you git info
  $ git config --global user.name yourname 
  $ git config --global user.email youemail


2. Create a directory
  $ mkdir git_work (by yourself)
  $ cd git_work

3. Make sure /opt/bin to you PATH
  $ vim ~/.bashrc
  export PATH=/opt/bin:$PATH
  $ source ~/.bashrc


4.Download the code
  $ repo  init -u git://192.168.1.93/manifest.git
  $ repo sync projectname

5. Create local branch
  $repo start xxx --all    (xxx:your branch name;your name as usually)

6. Set you repo push url (you can commit your code to the server)
  $repo config repo.pushurl  taxus-4412@192.168.1.93:/home/taxus-4412/repositories
   if this step erro,please note admin

For example:
  $ git config --global user.name zhaoshan
  $ git config --global user.email zhaoshan@handaer.com
  $ mkdir -p git_work/taxus-4412
  $ cd git_work/taxus-4412
  $ repo  init -u git://192.168.1.93/manifest.git
  $ repo sync projectname
  $ repo start zhaoshan --all
  $ repo config repo.pushurl  taxus-4412@192.168.1.93:/home/taxus-4412/repositories


7. Commit the code (you must do the 1-6 step)
  $ repo push
if you want to repo some project you can do like this
  $ repo  init -u git://192.168.1.93/manifest.git
  $ repo sync  projectname (you can find projectname in the file default.xml) 


8. before you commit the code ,you had better learn the usage of git

posted on 2013-09-23 11:09  羞涩的流氓  阅读(353)  评论(0编辑  收藏  举报