git相关问题资料

centos 利用yum更新git

https://my.oschina.net/tonystark/blog/1920556

#安装源

yum install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm

#安装

git yum install git

#更新

git yum update git

git clone 带用户名密码

git使用用户名密码clone的方式:

git clone http://username:password@remote

eg: username: abc@qq.com, pwd: test, git地址为git@xxx.com/test.git

git clone http://abc%40qq.com:test@git@xxx.com/test.git

git clone http://funykate%40sina.com:pwd@gitlab.gongsibao.com/big-data/testproject.git

注意:用户名密码中一定要转义 @符号转码后变成了%40

git上传代码的时候出现:Please tell me who you are.解决方法

https://www.cnblogs.com/feichuyan/p/11098140.html

是因为在创建git文件夹的时候信息不完善导致的

解决方法:

在命令行中执行

git config --global user.email "你的邮箱"

git config --global user.name "你的名字"

输入完后再接着执行git commit “注释

git add -A和 git add . git add -u在功能上看似很相近,但还是存在一点差别

git add . :他会监控工作区的状态树,使用它会把工作时的所有变化提交到暂存区,包括文件内容修改(modified)以及新文件(new),但不包括被删除的文件。

git add -u :他仅监控已经被add的文件(即tracked file),他会将被修改的文件提交到暂存区。add -u 不会提交新文件(untracked file)。(git add --update的缩写)

git add -A :是上面两个功能的合集(git add --all的缩写)

https://www.cnblogs.com/skura23/p/5859243.html

https://blog.csdn.net/wu347771769/article/details/88999943

登陆GitHub,打开“Account settings”,“SSH Keys”页面: 然后,点“Add SSH Key”,填上任意Title,在Key文本框里粘贴id_rsa.pub文件的内容:

git常见问题之git pull时Please specify which branch you want to merge with.

指定当前工作目录工作分支,跟远程的仓库,分支之间的链接关系。 比如我们设置master对应远程仓库的master分支

git branch --set-upstream master origin/master

这样在我们每次想push或者pull的时候,只需要 输入git push 或者git pull即可。 在此之前,我们必须要指定想要push或者pull的远程分支。

git push origin master

git pull origin master

https://blog.csdn.net/nonfuxinyang/article/details/77206479

Git冲突:Please commit your changes or stash them before you merge

http://www.skcircle.com/?id=400

git stash

git pull

git stash pop

Pull is not possible because you have unmerged files. Please, fix them up in the work tree, and then

https://blog.csdn.net/bingguang1993/article/details/93521939

1.pull会使用git merge导致冲突,需要将冲突的文件resolve掉 git add -u, git commit之后才能成功pull.

2.如果想放弃本地的文件修改,可以使用git reset --hard FETCH_HEAD,FETCH_HEAD表示上一次成功git pull之后形成的commit点。然后git pull.

git时某些子模块下载失败的一个解决方法

git submodule update --init --recursive cd到主目录中运行如下的命令

https://blog.csdn.net/qq_43356043/article/details/105801200

[笔记]解决git clone 子模块没下载全的问题

https://blog.csdn.net/u013553529/article/details/78307072/?utm_medium=distribute.pc_relevant.none-task-blog-baidujs_title-1&spm=1001.2101.3001.4242

git中submodule子模块的添加、使用和删除

https://blog.csdn.net/guotianqing/article/details/82391665

git中如何删除项目

https://blog.csdn.net/xingchen678/article/details/103782394

原文地址:https://www.cnblogs.com/funykatebird/p/14525968.html