首页
Web开发
Windows程序
编程语言
数据库
移动开发
系统相关
微信
其他好文
会员
首页
>
系统相关
> 详细
Ubuntu下git使用
时间:
2016-03-08 10:35:28
阅读:
168
评论:
0
收藏:
0
[点我收藏+]
标签:
sudo apt-get install git //安装git
git config --global user.name "github 用户名"
git config --global user.email "注册时用的email"
git config --global credential.helper cache //在一定的时间内在内存中保存代码
git config --global credential.helper ‘cache --timeout=3600‘ //设置超时的时间
建立新的 repository
进入项目根目录
git init //初始化一个空的Git repository
touch README //建立README
git add .
git commit -m “第一次提交,创建项目。”
git remote add origin git@github.com:yourname/xxx.git
git push -u origin master
//这里可能发生错误:无法推送一些引用到 ‘git@github.com:yourname/xxx.git‘
提示:更新被拒绝,因为远程版本库包含您本地尚不存在的提交。这通常是因为另外
提示:一个版本库已向该引用进行了推送。再次推送前,您可能需要先整合远程变更
提示:(如 ‘git pull ...‘)。解决方法:git push -u origin +master
Ubuntu下git使用
标签:
原文地址:http://www.cnblogs.com/devli/p/5253027.html
踩
(
0
)
赞
(
0
)
举报
评论
一句话评论(
0
)
登录后才能评论!
分享档案
更多>
2021年07月29日 (22)
2021年07月28日 (40)
2021年07月27日 (32)
2021年07月26日 (79)
2021年07月23日 (29)
2021年07月22日 (30)
2021年07月21日 (42)
2021年07月20日 (16)
2021年07月19日 (90)
2021年07月16日 (35)
周排行
更多
gitlab 在linux安装环境下存储地址
2021-07-29
当 Mac 未检测到外部显示器时如何修复它
2021-07-29
Ubuntu18.04安装qemu遇到问题-qemu : Depends: qemu-system (>= 1:2.11+dfsg-1ubuntu7)
2021-07-28
[Linux]Shell编程【待续】
2021-07-28
Linux系统资源查看
2021-07-27
Archlinux爬坑指南
2021-07-27
[Linux]Linux发展历程
2021-07-27
非桌面系统 (ubuntu)安装google-chrome
2021-07-27
在Ubuntu18.04系统中源码安装 gcc7.3.0
2021-07-23
Linux快捷键杂记
2021-07-22
友情链接
兰亭集智
国之画
百度统计
站长统计
阿里云
chrome插件
新版天听网
关于我们
-
联系我们
-
留言反馈
© 2014
mamicode.com
版权所有 联系我们:gaon5@hotmail.com
迷上了代码!