:%s/str1/str2/gc
檔案第一行到最後一行用str2取代str1
g全部取代 gc確認再取代
gg
到檔案最上面
GG
到檔案最下面
dd
刪除一行
v
選擇範圍
:%s/str1/str2/gc
檔案第一行到最後一行用str2取代str1
g全部取代 gc確認再取代
gg
到檔案最上面
GG
到檔案最下面
dd
刪除一行
v
選擇範圍
[Create a new git project]
move to git path
/* if add new repository */
cd /mnt/data/git/
su git
/* if this file already exist , so we should remove it */
rm -rf firstproject.git
mkdir firstproject.git
cd /mnt/data/git/firstproject.git
git init –bare –shared
vi description(輸入想要的描述內容)
/* if add new repository, must add in list */
cd /home/git
vi projects.list
[Other Commend]
/* get old version */
git clone XXX(PATH)
git log
/* check commit id ,then get version */
git checkout 5bdd66143ae8e6c296f50c114de21ab056eed85d
/* Upload new Version */
cd /to/your/path
git add .
git commit -m ‘your description’
git push