ubuntu下使用git和github
2018-02-03 18:35
369 查看
ubuntu下使用git和github
一、安装git
sudo apt-get install git
二、登录github账户
github网址:https://github.com/没有github账户的请自行申请
三、设置本地git的用名和邮箱
git config --global user.name = "用户名或者用户ID" git config --global user.email = "邮箱"
四、创建公钥
ssh-keygen -C 'you email address@xxx.com' -t rsa
公钥默认地址为 ~/.ssh/id_rsa.pub
五、上传公钥
在github的界面中 选择右上角的图标的Settings,然后选择SSH and GPG Keys,选择New SSH Key。Title可以随便命名,Key的内容拷贝自~/.ssh/id_rsa.pub 中的内容.
使用ssh -v git@github.com进行测试。看到下面的信息表示验证成功。
六、创建github仓库
在github上创建一个仓库,假设,新建的仓库为test在本地创建
echo "# test" >> README.md git init git add README.md git commit -m "first commit" git remote add origin https://github.com/czy36mengfei/test.git git push -u origin master
七、pull和push操作
可以pull github上的文件,修改后再用push更新至githubgit pull origin master echo 'new test 2' >> ReadMe.md git add ReadMe.md git commit -m 'new readme' git push origin master
八、查看当前git缓存空间状态
git status
参考资料:
如何在ubuntu下使用Github?
git和github在ubuntu下的使用
相关文章推荐
- Ubuntu下使用git提交代码至GitHub
- Linux下Git和GitHub使用方法总结(Ubuntu16.04)
- Ubuntu下Git以及Github使用
- Ubuntu下使用Git和GitHub
- Linux-Ubuntu下配置 Github ,使用 git命令操作进行版本控制
- git与github在ubuntu下的使用
- Ubuntu下安装git及配置使用github
- Ubuntu中使用git将项目托管到GitHub或Bitbucket上
- git与github在ubuntu下的使用
- git与github在ubuntu下的使用
- git与github在ubuntu下的使用
- git与github在ubuntu下的使用
- ubuntu 下使用git/github [Error: Permission denied (publickey) ]
- ubuntu 14.04 使用git 和 github
- Ubuntu下Git以及Github使用
- git与github在ubuntu下的使用 II
- Ubuntu下使用git提交代码至GitHub
- 【Kevin原创】Ubuntu下Git以及Github使用
- Ubuntu 系统下使用 git 命令行交互 github
- git与github在ubuntu下的使用