Git提交代码到远程仓库
来源:互联网 发布:怎样在淘宝网购物 编辑:程序博客网 时间:2024/05/19 13:30
1.设置用户名
git config --global user.name '仓库名'
2.设置用户名邮箱
git config --global user.email 'matchlessherovip@163.com'
3.查看设置
git config --list
4.初始化
git init
5.查看状态
git status
6.创建文件
touch test.java
7.将文件添加到暂存区
git add test.java
8.将文件添加到仓库
git commit -m'描述信息'
8.1将本地仓库代码提交到远程仓库
git push
1.先从远程仓库中clone代码到本地
git clone https://github.com/MatchlessHeroVIP/ssmtest.git
9.向文件中写内容
vi或者是vim test.java
10.查看文件内容
cat test.java
11.删除文件
rm -rf test.java
12.将文件从暂存区中删除
git rm test.java
13.将文件从仓库中删除
git commit -m'描述消息'
14.查看设置
git config --list
15.查看当前文件夹里的文件
ls
16.设置权限问题
将.git/config里的
[remote "origin"]
url = https://github.com/用户名/仓库名.git
修改为:
[remote "origin"]
url = https://用户名:密码@github.com/用户名/仓库名.git
==================================================================
17、将本地仓库关联到GitHub仓库上
执行:git remote add origin https://github.com/heidao10duan/myLrose
18、将GitHub仓库更新到本地
执行:git pull origin master
说明:因为可能GitHub仓库上可能有些变更,需要先同步到本地,才能将本地的改变提交到GitHub仓库上
19、将本地仓库同步到GitHub仓库
执行:git push origin master
解决github里的readme文件没有下载下来的问题
$ git pull --rebase origin master
然后执行
git push origin master
即可成功把本地的文件都上传到github上面去了。
20.此时再去github网站上也就可以看到对应文件了
- git命令行提交代码到远程仓库
- Git代码提交到CSDN远程仓库
- git 提交本地代码到远程仓库
- Git提交代码到远程仓库
- 【Git】git将本地代码提交到远程仓库
- git 提交到远程仓库
- GIT学习笔记--提交代码到远程仓库
- Git使用手册:git push 推送提交本地仓库代码文件到远程仓库
- git提交修改到远程仓库
- git 提交项目到远程仓库
- git提交到远程仓库出现问题
- GIT提交到远程仓库的步骤
- git 提交到远程仓库的错误
- git 提交到远程另外仓库
- 提交文件到远程仓库git
- 本地项目提交到git远程仓库
- GIT提交项目到远程仓库
- git提交代码至远程仓库
- 仿微信和QQ多图合并框架实现
- angularjs表格增强版增删改查排序敏感字和敏感字替换#(商品)
- Java字母加数字组合比较大小
- 底部栏加Fragment
- 快速排序
- Git提交代码到远程仓库
- effective C++ 学习笔记——4 设计与声明
- JS函数传递字符串(字符串转义)
- 字节流解析Json
- ViewPager和小圆点联动
- luogu P2587 [ZJOI2008]泡泡堂
- ios版本更新提示
- 【云计算的1024种玩法】第1招:制作一个浪漫的表白网页
- maven