ckdk's blog

git常用命令

2016/04/15

git常用命令

  • 配置
1
2
git config --global user.name "your name"  
git config --global user.email example@e.com
  • 生成密钥
1
ssh-keygen -t rsa -C "example@e.com"
  • 基本
1
2
3
4
5
git push origin master
git pull origin master
git push origin test:test
git add .
git commit -am 'commit msg'
  • 保存、恢复进度
1
2
git stash
git stash apply
  • 删除远程分支
1
git push origin --delete test

在ubuntu下使用git感觉push/pull/clone等操作都很慢,可以修改/etc/ssh/ssh_config文件,将GSSAPIAuthentication no打开, 亲测有明显效果。

CATALOG
  1. 1. git常用命令