git Bash常用命令
1.Construct ssh key (If you want to commit to git server via THIS COMPUTER)
git config --global user.name " YOUR_USERNAME"
git config --global user.email "YOUR_EMAL@EMAIL.COM"
cd ~/.ssh
ssh-keygen -t rsa -C "YOUR_EMAIL@YOUREMAIL.COM"
【 then enter your passphrase
after these operation , copy the content of "~/.ssh/id_rsa.pub" to the git server
2.Setup a new repository on your server
Manually or via GUI 【 cz I don't know how to setup via bash :<
3.Commit your code to server
If it's the first time you commit your code :
cd /your/source/code/folder
git init
git add .
git commit -m "first commit"
git remote add origin git@yourserver.com:username/project.git
git push -u origin master
Or if you have once commited :
git add .
git commit -m "second commit"
git push -u origin master
4.Clone your code from server to PC
cd /your/destination/directory
git clone git@yourserver.com:username/repository.git
Ref:
http://blog.csdn.net/it_yuan/article/details/8638321
http://www.cnblogs.com/wenjiang/p/3161682.html
http://stackoverflow.com/questions/10285198/git-clone-fatal-remote-error-access-denied-or-repository-not-exported
git Bash常用命令的更多相关文章
- git bash 常用命令
1. cd : 切换到哪个目录下, 如 cd e:\fff 切换 E 盘下面的fff 目录. 当我们用cd 进入文件夹时,我们可以使用 通配符*, cd f*, 如果E盘下只有一个f开头的文件 ...
- GIT 版本控制常用命令学习汇总
GIT 版本控制常用命令汇总 git version 查看当前git版本信息 git help 获取全部命令帮助信息 git help <command> 获取指定命令帮助信息 git c ...
- git log 常用命令及技巧
git log常用命令以及技巧 1.git log 如果不带任何参数,它会列出所有历史记录,最近的排在最上方,显示提交对象的哈希值,作者.提交日期.和提交说明.如果记录过多,则按Page Up.Pag ...
- Git基本常用命令
Git基本常用命令如下: mkdir: XX (创建一个空目录 XX指目录名) pwd: 显示当前目录的路径. git init 把当前的目录变成可以管理的git仓库,生成隐藏.git文件. git ...
- Git是什么、Git的功能、为什么versioncontrol用Git、Git的常用命令、Git的优缺点
Git是什么 git是目前世界上最先进的分布式版本控制系统(没有之一). Git是用于 Linux内核开发的版本控制工具.与常用的版本控制工具 CVS, Subversion 等不同,它采用了分布式版 ...
- Git stash 常用命令
参考: Git: How to look at the stash Git学习笔记05--git stash Git stash 常用命令 1.git stash: 保存当前的工作进度: 2.git ...
- Git 基础 —— 常用命令
Git 基础学习系列 Git 基础 -- 安装 配置 别名 对象 Git 基础 -- 常用命令 Git 基础 -- 常见使用场景 Git基础 -- Github 的使用 git init 创建 Git ...
- git之常用命令
git之常用命令 1.下载远程仓库最新代码 $ git pull --rebase origin master 2.上传代码 $ git push origin master 3.退出编辑 ESC + ...
- Git Bash 常用指令
1. 关于git bash常用指令 推荐博客: 史上最简单的 GitHub 教程 猴子都能懂的GIT入门 Learn Version Control with Git for Free Git Do ...
随机推荐
- (一)Maven初步了解与认识
Apache Maven是一个软件项目管理的综合工具.基于项目对象模型(POM)的概念,提供了帮助管理构建.文档.报告.依赖.发布等方法,Maven简化和标准化项目建设过程.处理编译,分配,文档,团队 ...
- ORA-02429: cannot drop index used for enforcement of unique /primary key
相信不少人遇到过ORA-02429: cannot drop index used for enforcement of unique /primary key 这个错误,对应的中文提示"O ...
- ORACLE等待事件: log file parallel write
log file parallel write概念介绍 log file parallel write 事件是LGWR进程专属的等待事件,发生在LGWR将日志缓冲区(log_buffer)中的重做日志 ...
- angularJs自定义服务(实现签名和加密)
写在前面: angularJS是google公司主推的js开发优秀框架... 页面展示: 在应用中进行加密是普遍存在的,个人建议在前端实现加密签名(前端加密是否必要来自知乎:http://www.zh ...
- Hibernate注解----关联映射注解以及课程总结详解----图片版本
上一篇,记录了Hibernate注解----类级别注解以及属性注解详解 ,我们这一节主要讲解的是Hibernate注解----关联映射注解以及课程总结详解. 本节的主要内容: 第3章 关联映射注解 3 ...
- js字符串转为日期格式
1. <script type="text/javascript"> //字符串转日期格式,strDate要转为日期格式的字符串 function getDate(st ...
- LeetCode#11. Container With Most Water
问题描述 Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ...
- 谈谈Redis的SETNX
谈谈Redis的SETNX 发表于2015-09-14 在 Redis 里,所谓 SETNX,是「SET if Not eXists」的缩写,也就是只有不存在的时候才设置,可以利用它来实现锁的效果,不 ...
- 今天主要推荐一下django学习的网址!
前言:每个月忙碌的头20天后,在上班时间投入到django理论学习的过程中,花了差不多3天时间简单的研究了一下django,着实废了我不少脑细胞. 采用虫师前辈的一张图和话: 如果你把这过程梳理清晰了 ...
- cefsharp重写默认js弹窗(alert/confirm/prompt)
1.设置js弹窗控制器 webView.JsDialogHandler = this; //js弹窗控制 this表示本类对象,所以本类要实现IJsDialogHandler接口 2.实现IJsDi ...