git安装使用
2016-06-26 00:31
253 查看
服务器安装
rpm -qa git
没安装就
yum install git
cd ~
mkdir .ssh
ssh-keygen -t rsa
cd ./.ssh/
cat id_rsa.pub >> ~/.ssh/authorized_keys
cd /usr/local
mkdir gitcode
cd gitcode
mkdir edu.git
git --bare init
如果git init 可能导致提交异常,见提交异常解决另一文
windows上
一 .设置git的user name和email:
$ git config --global user.name "lxyz"
$ git config --global user.email "1129103472@qq.com"
二 生成密钥
ssh-keygen -t rsa -C “1129103472@qq.com”
拷贝文件内容到服务器
git init
git add .
git commit -m '初始化'
git remote add origin root@101.201.233.141:/usr/local/gitcode/edu.git
git push origin master
修改remote origin
git remote rm origin
git remote add origin
root@101.201.233.141:/usr/local/gitcode/edu.git
rpm -qa git
没安装就
yum install git
cd ~
mkdir .ssh
ssh-keygen -t rsa
cd ./.ssh/
cat id_rsa.pub >> ~/.ssh/authorized_keys
cd /usr/local
mkdir gitcode
cd gitcode
mkdir edu.git
git --bare init
如果git init 可能导致提交异常,见提交异常解决另一文
windows上
一 .设置git的user name和email:
$ git config --global user.name "lxyz"
$ git config --global user.email "1129103472@qq.com"
二 生成密钥
ssh-keygen -t rsa -C “1129103472@qq.com”
拷贝文件内容到服务器
git init
git add .
git commit -m '初始化'
git remote add origin root@101.201.233.141:/usr/local/gitcode/edu.git
git push origin master
修改remote origin
git remote rm origin
git remote add origin
root@101.201.233.141:/usr/local/gitcode/edu.git
相关文章推荐
- 求相交链表的交点
- Drawing in Singapore
- maven搭建
- Qt Creater中Clang-format的使用
- Mac下编译"Unix环境高级编程"的apue.h的错误解决
- ASP连接Access2013
- ubuntu系统备份与还原
- 分页存储过程
- Linux内核中锁机制之信号量、读写信号量
- matlab 入门(1)
- 1042. 字符统计(20) PAT 乙级
- 【折腾日记GEN8_1】ILO语言包安装
- 事务与锁
- 有趣的u-boot移植教程
- 前端构建工具Gulp入门指南(第一篇)
- HDU——2647Reward(DFS或差分约束)
- 阿里前端开发工具Weex安装学习
- Struts2学习(五)—表单验证 XML
- maven打一个可执行的jar包
- 微信JSAPI支付 统一下单 (.net后台)