Chinaunix首页 | 论坛 | 博客
  • 博客访问: 24603
  • 博文数量: 3
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 35
  • 用 户 组: 普通用户
  • 注册时间: 2013-07-24 12:25
文章分类
文章存档

2015年(1)

2014年(2)

我的朋友

分类: 其他平台

2014-11-03 14:05:28

1.create a new repository on the command line

点击(此处)折叠或打开

  1. git init
  2. git add .
  3. git commit -m "first commit"
  4. git remote add origin
  5. git push -u origin master

2.push an existing repository from the command line

点击(此处)折叠或打开

  1. git remote add origin
  2. git push -u origin master

3.create a new branch on the command line

点击(此处)折叠或打开

  1. git checkout -b iss114
  2. git add ./ssh_check_deny.sh
  3. git commit -m 'ssh_check'
  4. git remote add origin
  5. git push -u origin iss114

4.merge a branch on the command line

点击(此处)折叠或打开

  1. git branch
  2. git checkout master
  3. git merge iss115
  4. git remote add origin
  5. git push -u origin master

5.delete a remote/local branch on the command line

点击(此处)折叠或打开

  1. git push origin :iss114               #delete remote branch
  2. git branch -r -d origin/iss114        #delete local branch

6.record updates in local repository on the command line

点击(此处)折叠或打开

  1. git commit -m 'iss114'

附注:提交代码报错时,很大几率用到的命令git remote rm origin.
阅读(1263) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~