GIt上传本地项目方法
GIt上传本地项目方法关于在github上的安装记录:注册登录创建配置GUIBash命令行上传报错解决方案感谢注册首先,先注册github账号:https://github.com/登录看这里:当然,作为一位认真的程序员(媛),这个功能建议不用,看英文利用自己编程原生理解。登录你的账号:(成功后)创建点击它,将开启你的github编程生涯!!!你要去gi
#GIT本地上传项目方法关于在github上上的安装记录: - 注册 - 登录 - 创建 - 配置 - GUI - 巴什 - 命令行上传 - 报错 - 解决方案 - 感谢----- -
注册首先,先注册github账号:https://github.com/
登录>看这里:当然,作为一位认真的程序员(媛),这个功能建议不用,看英文利用自己编程原生理解。登录你的账号:(成功后)![这里写图片描述](
![这里写图片描述](https://img-blog.csdn.net/20171220101241600?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvc2luYXRfMzgyMzk0NTQ=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity / SouthEast)你要去git官网下载程序:https://git-scm.com/downloads
###配置Bash命令在安装完成的GIT中,最后一步,你需要在Git里面有自己的Github信息,所以:http ://www.runoob.com/git/git-install-setup.html 该Git安装手册中有一个最后一步,如下:![这里写图片描述](https://img-blog.csdn.net/20171220101527206?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvc2luYXRfMzgyMzk0NTQ=/font/5a6L5L2T/fontsize/400/fill / I0JBQkFCMA == /溶解/ 70 /重力/东南)!
[这里写图片描述](https://img-blog.csdn.net/20171220101627452?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvc2luYXRfMzgyMzk0NTQ=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/这是百度经验链接,但因为第5步所以换了方式但是.git这个文件依然存在,没有被删除这样在之后你搭建的时候再登录一次即可。点开你的.git所在目录,里面的样子是:![这里写图片描述](http:// img .blog.csdn.net / 20171220101800790?水印/ 2 /文本/ aHR0cDovL2Jsb2cuY3Nkbi5uZXQvc2luYXRfMzgyMzk0NTQ = /字体/ 5a6L5L2T /字号/ 400 /填充/ I0JBQkFCMA == /溶解/ 70 /重力/东南)
“`
例如我的小汽车项目,我将本地做好的汽车项目包复制粘贴在.git文件下,右键点击git bash,进入命令行编辑。git
init
git commit -m'Car'git
remote add origin https ://github.com/Liumce/Car.git
git push origin master
如果执行git remote add origin
https://github.com/Liumce/Car.git
如果出现错误,
remote origin already exists
则执行以下语句::
git remote rm origin
再往后执行git remote add origin https://github.com/Flowerowl/stumansys.git即可。
在执行git push origin master时,报错:
未能推送som refs ...。
执行以下语句:
git pull origin master
最后报了错:
$ git init
重新初始化C:/Users/lenovo/.git/.git/中的现有Git存储库
$ git commit -m'第一次提交'
关于分支主
分支您的分支与'origin / master'是最新的。
未针对提交进行的更改:
修改:testGIT.txt
未跟踪的文件:
汽车/
没有更改添加到提交
$ git remote add origin https://
致命:远程原点已经存在。
$ git remote add origin https://github.com/Liumce/Car.git
致命:远程原点已经存在。
$ git remote rm origin
$ git remote add origin https://github.com/Liumce/Car.git
$ git push origin master
一切都是最新的
git remote -v
bash:$:命令未找到
$ git的远程-v
起源 https://github.com/Liumce/Car.git(取)
起源 https://github.com/Liumce/Car.git(推)
$ git branch
* master
$ git init
重新初始化C:/Users/lenovo/.git/.git/中的现有Git存储库
$ git commit -m'第一次提交'
关于分支主
更改没有为commit提交:
修改:testGIT.txt
未跟踪的文件:
汽车/
没有更改添加到提交
(还是一样的问题) git remote rm origin
gitremoteaddoriginhttps://github.com/Liumce/Car.git
g
i
t
r
e
m
o
t
e
a
d
d
o
r
i
g
i
n
h
t
t
p
s
:
/
/
g
i
t
h
u
b
.
c
o
m
/
L
i
u
m
c
e
/
C
a
r
.
g
i
t
git pull origin master从https://github.com/Liumce/Car * branch master - > FETCH_HEAD * [new branch] master - > origin / master已经是最新的了。
gitpushoriginmaster所有最新的
g
i
t
p
u
s
h
o
r
i
g
i
n
m
a
s
t
e
r
所
有
最
新
的
git remove -v git:'remove'不是git命令。参见'git -help'。最类似的命令是远程
gitremote−voriginhttps://github.com/Liumce/Car.git(fetch)起源https://github.com/Liumce/Car.git(push)
g
i
t
r
e
m
o
t
e
−
v
o
r
i
g
i
n
h
t
t
p
s
:
/
/
g
i
t
h
u
b
.
c
o
m
/
L
i
u
m
c
e
/
C
a
r
.
g
i
t
(
f
e
t
c
h
)
起
源
h
t
t
p
s
:
/
/
g
i
t
h
u
b
.
c
o
m
/
L
i
u
m
c
e
/
C
a
r
.
g
i
t
(
p
u
s
h
)
git分支* master
gitinit重新初始化C:/Users/lenovo/.git/.git/
g
i
t
i
n
i
t
重
新
初
始
化
C
:
/
U
s
e
r
s
/
l
e
n
o
v
o
/
.
g
i
t
/
.
g
i
t
/
git中的现有Git仓库没有指定,没有增加。也许你想说'git add。'?$ git init git add
gitremoteaddoriginhttps://github.com/Liumce/Car.git致命的:远程原点已经存在。
g
i
t
r
e
m
o
t
e
a
d
d
o
r
i
g
i
n
h
t
t
p
s
:
/
/
g
i
t
h
u
b
.
c
o
m
/
L
i
u
m
c
e
/
C
a
r
.
g
i
t
致
命
的
:
远
程
原
点
已
经
存
在
。
git remote rm origin
gitremoteaddoriginhttps://github.com/Liumce/Car.git
g
i
t
r
e
m
o
t
e
a
d
d
o
r
i
g
i
n
h
t
t
p
s
:
/
/
g
i
t
h
u
b
.
c
o
m
/
L
i
u
m
c
e
/
C
a
r
.
g
i
t
git pull origin master从
gitpushoriginmaster所有最新的
g
i
t
p
u
s
h
o
r
i
g
i
n
m
a
s
t
e
r
所
有
最
新
的
git remove -v git:’remove’不是git命令。参见’git –help’。最类似的命令是远程
gitremote−voriginhttps://github.com/Liumce/Car.git(fetch)originhttps://github.com/Liumce/Car.git(push)
g
i
t
r
e
m
o
t
e
−
v
o
r
i
g
i
n
h
t
t
p
s
:
/
/
g
i
t
h
u
b
.
c
o
m
/
L
i
u
m
c
e
/
C
a
r
.
g
i
t
(
f
e
t
c
h
)
o
r
i
g
i
n
h
t
t
p
s
:
/
/
g
i
t
h
u
b
.
c
o
m
/
L
i
u
m
c
e
/
C
a
r
.
g
i
t
(
p
u
s
h
)
git branch * master
gitinit重新初始化C:/Users/lenovo/.git/.git/
g
i
t
i
n
i
t
重
新
初
始
化
C
:
/
U
s
e
r
s
/
l
e
n
o
v
o
/
.
g
i
t
/
.
g
i
t
/
git中的现有Git仓库没有指定,没有增加。也许你想说’git add。’?$ git init git add
用法:git init [-q | -quiet] [-bare] [-template =] [-shared [=]] []
$ git init
重新初始化C:/Users/lenovo/.git/.git/中的现有Git存储库
$ git add。
(此处空格。)
$ git commit -m'第一次提交'
[master c223efb]第一次提交
6文件改变,429插入(+)
创建模式100644 Car / .classpath
创建模式100644 Car / .project
创建模式100644 Car / .settings / org.eclipse.jdt.core.prefs
创建模式100644 Car / bin / Car.class
创建模式100644 Car / src / Car.java
$ git remote add origin https://github.com/Liumce/Car.git
致命:远程原点已经存在。
$ git push origin master
计数对象:12,完成。
增量压缩使用多达4个线程。
压缩对象:100%(9/9),done。
写作对象:100%(12/12),7.98 KiB | 454.00 KiB / s,完成。
总共12(delta 0),重用0(delta 0)
到https://github.com/Liumce/Car.git
7bc721a..c223efb master - > master $“`
这一步其实在报错代码里面,我已经写上了解决方法。敲重点 github用git bash上传项目最后提示一切都是最新的,但没传上去所以在百度的帮助下:解决方案如下:http:/ /github.mygreen.site/ 2017/12/08/20171208 /然后再回到自己的项目文件,这里得到bash按照文档的步骤,在初始之后,也就是git init之后,加上git add。(此处有一个空格,一个点),然后依次按照步骤走,最后就上传成功啦!! [这里写图片描述](
感谢> 感谢大佬:http : //lazynight.me/2898.html 感谢mygreen:http : //github.mygreen.site/2017/12/08/20171208/附上这个小汽车的项目代码(java GUI):HTTPS://github.com/Liumce/Car.git —— — [1]:http://math.stackexchange.com/ [2]:https://github.com / jmcmanus / pagedown-extra “下页额外 ”[3]:HTTP://meta.math。stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference [4]:http:// bramp.github.io/js-sequence-diagrams/ [5]:HTTP://adrai.github .io / flowchart.js / [6]:https://github.com/benweet/stackedit
更多推荐
所有评论(0)