git仓库流程以及遇到的问题

一、git仓库流程

1.设置全局的机器名字和email地址;

2.创建仓库,填写基本信息

3.复制克隆的地址,使用git bash或者git gui

1).git bash

(1).git clone http://192.168.0.222:8080/lixianlin/lxl.git (第一次输入账号密码,如报错看:控制面板\所有控制面板项\凭据管理器 里面是否有凭据没有修改)
(2).克隆后再文件下的README.md中修改内容如readme测试
(3).代码操作 git add README.md #将readme文件添加到提交区
	git commit -m "first commit" #参数的提交信息
	git push #将本地文件推到远程 
	(第一次加入信息git remote add origin http://192.168.0.222:8080/lixianlin/lxl.git
	git push -u origin master
	然后第一次结束后面直接push)

2).git gui

1.直接把项目文件复制在本地文件中,修改文件后 git gui
2.进入图形化界面操作(Rescan刷新 StageChanged从上面移动到Staged Changes Sign Off签名 Commit提交代码 Push 推送到服务器仓库)

二、问题及解决

1. git clone

http://192.168.0.222:8080/xxx/xx.git(第一次输入账号密码,如果遇到以下问题:
fatal: Authentication failed,
就是凭证失败了,如报错看:控制面板\所有控制面板项\凭据管理器 里面是否有凭据没有修改,是否保存了之前的用户名和密码)

2. README.md文件需要自己创建并修改

3. git push

使用git push,如果出现下面报错:

fatal: No configured push destination.

Either specify the URL from the command-line or configure a 

remote repository using

git remote add <name> <url>

and then push using the remote name

git push <name>

解决方法:在git仓库创建新的仓库然后复制仓库URL链接:
git remote add origin http://192.168.0.222:8080/lixianlin/lxl.git
git push -u origin master

4、git clone

执行git clone报错remote: invalid credentials fatal: Authentication failed for ‘http://192.168.xxxx/xxx/xx.git/’
解决方法:
git credential-manager uninstall
git credential-manager install
这样一般会解决。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值