github简单应用
来源:互联网 发布:淘宝店进货渠道 编辑:程序博客网 时间:2024/05/22 13:08
若本地的文档想上传到github上:
1个人github主页创建新仓库:
首先在github个人主页上创建一个新的仓库 起一个名字
2仓库初始化:
本地文档下 git init 会多一个隐藏文件夹.git
3配置git:
输入命令:git config --global user.name "你的用户名"
输入命令:git config --global user.email 你的邮箱地址
4添加托管文件:
git add ./* 是所有所有的文件
5commit项目:
git commit -m "描述信息(修改了什么,新增了什么)"
6上传项目:
git remote add origin 仓库地址
git push -u origin master
git pull
git push
如果版本低的话会出现错误:
error: The requested URL returned error: 403 Forbidden while accessing https://github.com/hankai17/linux_pro.git/info/refs
fatal: HTTP request failed
解决方法:
vim .git/config
修改:
[remote "origin"]
url = https://github.com/hankai17/example.git
为:url = https://hankai17@github.com/hankai17/example.git
如果想在本地删除文件,同时反映到个人网页github上:
先rm -rf test
再git rm test/*
再git commit -m "delete test/*"
再git pull
再git push
“git remote add origin 仓库地址”:这个命令只用输一次,以后就不用再输入了
直接git add,git commit,git pull,git push
1个人github主页创建新仓库:
首先在github个人主页上创建一个新的仓库 起一个名字
2仓库初始化:
本地文档下 git init 会多一个隐藏文件夹.git
3配置git:
输入命令:git config --global user.name "你的用户名"
输入命令:git config --global user.email 你的邮箱地址
4添加托管文件:
git add ./* 是所有所有的文件
5commit项目:
git commit -m "描述信息(修改了什么,新增了什么)"
6上传项目:
git remote add origin 仓库地址
git push -u origin master
git pull
git push
如果版本低的话会出现错误:
error: The requested URL returned error: 403 Forbidden while accessing https://github.com/hankai17/linux_pro.git/info/refs
fatal: HTTP request failed
解决方法:
vim .git/config
修改:
[remote "origin"]
url = https://github.com/hankai17/example.git
为:url = https://hankai17@github.com/hankai17/example.git
如果想在本地删除文件,同时反映到个人网页github上:
先rm -rf test
再git rm test/*
再git commit -m "delete test/*"
再git pull
再git push
“git remote add origin 仓库地址”:这个命令只用输一次,以后就不用再输入了
直接git add,git commit,git pull,git push
参考的是强哥的链接 http://www.cnblogs.com/yongqiang/p/6114488.html
---------------------------------------------------------------------
git push origin pdns-recursor_devlp
git log
0 0
- github简单应用
- github应用
- GitHub应用
- Git和Github的关系以及简单应用
- VS2015应用Github扩展
- headfirst Github应用
- GitHub应用(二)
- GitHub的简单使用
- github简单使用教程
- github简单使用教程
- github简单使用教程
- github简单使用教程
- github 简单使用教程
- github简单教程
- github简单使用教程
- github简单使用方法
- github简单使用教程
- GIThub简单使用教程
- web App 移动开发之ionic开发环境部署
- 数据结构与算法分析笔记与总结(java实现)--二叉树16:从上往下打印二叉树
- Mysql支持emoji表情
- Git常用命令行
- Linux基础--管道(管线命令)
- github简单应用
- Java:对double值进行四舍五入,保留两位小数的几种方法
- CCF之Z字型扫描(java)
- 装系统终极版
- 数据结构与算法分析笔记与总结(java实现)--二叉树17:按之字形顺序打印二叉树
- 基于CentOS的Splunk安装
- 研究虚表(探索多态的原理)和菱形虚拟继承
- C++中的new、operator new与placement new
- 七牛云存储____js打水印加上传图片