git svn

来源:互联网 发布:千方百剂医药软件下载 编辑:程序博客网 时间:2024/06/05 10:47
1.SVN 客户端在linux下的使用。
  a.安装
    在ubantu下可以直接apt-get install subversion直接安装。也可以下载tar解压后安装。
  b.使用
  1.svn checkout +url
    就会checkout url指向的资源,并会在当前路径下建立文件夹存储。
  2.svn add + file(path) 
    会add file,后面必须进行svn commit才能正式提交
  3.svn delete +file(path)
    会del file,后继必须进行svn commit才能正式删除
  4.svn commit
  5.svn cleanup
  6.svn revert +filename  


2.svn初次使用会出现一些问题:提示如下
  svn: Could not use external editor to fetch log message; consider setting the $SVN_EDITOR environment variable or using the --message (-m) or --file (-F) options 
  svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR is set, and no 'editor-cmd' run-time configuration option was found 


  问题原因是:  
  没有设置svn编辑器的环境变量,主要是import、commit中填写comment要用


  在 终端中 sudo vim /etc/bashrc 打开文件


  加入:export SVN_EDITOR=vim


  如果,保存的时候,无法保存。wq! 强制保存退出


  还有:
  编辑完以后一般需要让配置文件立即生效,可执行命令:
  source  /etc/bashrc
================git===================
1.git 安装
 先安装依赖
 yum install curl-devel expat-devel gettext-devel \
 openssl-devel zlib-devel
 下载源码
 http://git-scm.com/download
 编译安装
  tar -zxf git-1.7.2.2.tar.gz
  cd git-1.7.2.2
  make prefix=/usr/local all
  sudo make prefix=/usr/local install
  也可以直接安装
  yum install git-core
2.使用
  现在就用到
  git checkout + branch name 
  git pull //从服务器上拉下来数据
  其余命令可以参看 git help
原创粉丝点击