git svn

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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章