git常用命令
来源:互联网 发布:e店宝官方下载3.0 mac 编辑:程序博客网 时间:2024/06/04 17:48
1.获取github代码
使用ssh-keygen生成本地密钥对.ssh-keygen -t rsa -C “youremail@example.com”
在Linux键入ssh-keygen -t rsa -C "xxxxxxx@sina.com"一路enterroot@spider:/# ssh-keygen -t rsa -C "xxxxxxx@sina.com" Generating public/private rsa key pair.Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa.Your public key has been saved in /root/.ssh/id_rsa.pub.The key fingerprint is:0a:33:ab:90:a6:6e:af:3d:3d:47:08:d8:ce:69:6f:e9 xxxxxxx@sina.comThe key's randomart image is:+--[ RSA 2048]----+| || || o || . o || o * . S || . = * o ||o.. + + ||oo.o * . ||+o+o+Eo |+-----------------+/root/.ssh/会生成 id_rsa,id_rsa.pub两个密钥。将id_rsa.pub公钥公布给other,other发消息给你的时候会将消息用你的公钥加密,你收到消息采用私钥解密。(采用公钥加密的内容只能私钥才能解开)。将id_rsa.pub的内容贴到github的ssh-key保存之后即可。sudo git clone git@github.com:githubname/proname.git获取对应代码
2.提交github
先告诉github你是谁git config --global user.name "yourname"git config --global user.email "yourname@domain.com"git add test.txtgit commit -m "add a file named test.txt"git push origin master提交成功
3.常用git命令
0 0
- git 常用命令
- Git常用命令
- git 常用命令
- git 常用命令
- git 常用命令
- git 常用命令
- GIT常用命令
- git 常用命令
- git 常用命令
- Git 常用命令
- git 常用命令
- Git常用命令
- Git常用命令
- git 常用命令
- Git 常用命令
- git常用命令
- git 常用命令
- Git 常用命令
- unity3D-游戏/AR/VR在线就业班 C#入门抽象类学习笔记
- 常用字符串函数
- H5数据推送
- WKWebView 与JS的交互
- Unity实战 RTS3D即时战略游戏开发(七) 信息显示
- git常用命令
- 《Android开发艺术探索》第九章四大组件的工作过程小结
- Webform和MVC,为什么MVC更好一些?
- 高德持续定位疑问??
- 在jsp和class文件中获取你工程的绝对路径
- 加载图片类
- HTTPS 攻击实例与防御
- Jenkins2.27 实战部署
- Windows安装运行Kafka