github 在ubuntu上使用入门
2015-05-28 15:08
387 查看
首先注册一个github帐号,然后create a new repository,随便娶个名字.,如customtitlebar.
然后在ubuntu终端下安装git:
sudo apt-get install git
然后git初始设置:
git config --global user.name "pythonsoft" #你的github用户名
git config --global user.email pythonisfun@gmail.com #你注册github所使用的邮箱
然后初始化git仓库:
cd /workspace #切换到你的工作目录,随意
git init
git add project #添加你想要上传的工程或文件到git 仓库
添加必要的说明文件README.md,介绍你的工程:
echo "#custom title bar" >> README.md
git add README.md
然后提交
git commit -m "简要说明:比如修改了什么bug"
然后上传仓库:
git remote add origin https://github.com/pythonsoft/customtitlebar.git #上传的url路径,后面跟的是 用户名/repository.git
git push -u origin master
根据提示输入用户名,密码,等一会儿就上传成功。打开你的github,你会看到文件已经上传了.
如果你使用了代理,可能会遇到下面的错误:
然后在ubuntu终端下安装git:
sudo apt-get install git
然后git初始设置:
git config --global user.name "pythonsoft" #你的github用户名
git config --global user.email pythonisfun@gmail.com #你注册github所使用的邮箱
然后初始化git仓库:
cd /workspace #切换到你的工作目录,随意
git init
git add project #添加你想要上传的工程或文件到git 仓库
添加必要的说明文件README.md,介绍你的工程:
echo "#custom title bar" >> README.md
git add README.md
然后提交
git commit -m "简要说明:比如修改了什么bug"
然后上传仓库:
git remote add origin https://github.com/pythonsoft/customtitlebar.git #上传的url路径,后面跟的是 用户名/repository.git
git push -u origin master
根据提示输入用户名,密码,等一会儿就上传成功。打开你的github,你会看到文件已经上传了.
如果你使用了代理,可能会遇到下面的错误:
steven@steven-OptiPlex-330:/$ git push -u origin master error: The requested URL returned error: 407 while accessing https://github.com/pythonsoft/customtitlebar.git/info/refs fatal: HTTP request failed steven@steven-OptiPlex-330:/$ sudo gedit .git/config编辑 .git/config文件添加代理:
[http] proxy = http://user:pass@ip_or_host:port [https] proxy = http://user:pass@ip_or_host:port[/code] 保存后,重新执行git push -u origin master即可.
相关文章推荐
- Ubuntu 12.04 下 GitHub安装和使用快速入门
- Ubuntu 12.04 下 GitHub安装和使用快速入门
- ubuntu14.04环境中github的安装与使用入门教程(最新,2016-06-03)
- eclipse再见,android studio 新手入门教程(三)Github(.ignore忽略规则)的使用
- Ubuntu14.04下Git安装和使用快速入门
- 【Github教程】史上最全github使用方法:github入门到精通
- Git - 【Github教程】史上最全github使用方法:github入门到精通
- GitHub入门使用,通过命令方式
- 如何使用github托管项目---快速入门(菜鸟教程)
- 【Github教程】史上最全github使用方法:github入门到精通
- Ubuntu下使用Git和GitHub
- ubuntu下使用git, github
- 【Github教程】史上最全github使用方法:github入门到精通
- 【Github教程】史上最全github使用方法:github入门到精通
- 在ubuntu下怎么安装和使用Github
- git快速入门(五)远程仓库以及如何使用github
- ubuntu16.04下github的使用
- 【Github教程】史上最全github使用方法:github入门到精通
- 安卓开发GitHub的入门使用流程---》适合小学生
- 史上最全github使用方法:github入门到精通