How to use GIT on Client side (Through SSH)
来源:互联网 发布:php interface 编辑:程序博客网 时间:2024/05/16 05:43
1. Setup GIT
1.1
# sudo vim /etc/hosts
Add line:
192.168.0.243 my-git-server
1.2
# git config --global user.name "steven"
# git config --global user.email "steven.liyong@gmail.com"
# git config --global color.ui auto
1.3
Create ssh id_rsa file from server
1.4
# sudo cp id_rsa ~/.ssh/
# sudo chmod 666 ~/.ssh/id_rsa
# eval 'ssh-agent' (or ssh-agent bash)
# ssh-add ~/.ssh/id_rsa
2.1
# sudo vim ~/.ssh/config
Add lines:
Host my-git-server
User steven
2.2 (option)
# ssh my-git-server <--- check whether you can ssh the git server without password
# exit
3.
3.1 Get/Create branch for local fix
# mkdir -p ~/work/git
# git clone ssh://git-my-server/git/development/smartq7.git
# cd smartq7
# git branch
# git checkout -b smartq7-master origin/smartq7-master)
3.2 Modify the local src code, for example
#vim testsrc.h
3.3 Commit local src code to my-git-server
#git add testsrc.h
#git commit -m "Just for test"
#git push
3.4 Create tag on my-git-server
#ssh my-git-server
#cd /git/development/smartq7.git
#git tag TEST_TAG_20100318 smartq7-master
DONE!
- How to use GIT on Client side (Through SSH)
- Learn How TO Use SSH To Get Through the GFW
- How to use GIT?
- How to use Git
- how to use git
- How to use GIT?
- How to use git
- How to use ADB through lan
- How to deploy a .Net assmebly for COM use through CAB on Web Page (转)
- How to deploy a .Net assmebly for COM use through CAB on Web Page
- How To Use Git Effectively
- How To Use Git Branches
- How to read text file in client side via HTML5
- How to use SSH in Java Programmatically
- How to use "mount.cifs" on ESX
- how to use struct on c++
- How to use vi on linux
- how to use onSearchRequested on Fragment
- Jsp上传文件(FileUpload+Servlet)
- Away3d基础 3 -相机
- Js字符串操作函数大全
- Away3d 基础4 -操控三维物体
- 常见数据恢复种类
- How to use GIT on Client side (Through SSH)
- 吻你 我不惊醒你
- 呵呵 不知觉 已经3月份了
- Away3d学习笔记1-三维世界的四个基本构件
- ssh整合原理
- 太阳能光伏发电系统原理及组成
- Away3D基础5-3D基本元素(1)
- STL MAP自定义主键
- 搜集的工具软件(.NET)