新建一个项目git初始化文件命令

2019-05-14  本文已影响0人  轻芒_e

…or create a new repository on the command line

echo "# 111" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin git@github.com:tongluren1/111.git
git push -u origin master

…or push an existing repository from the command line

git remote add origin git@github.com:tongluren1/111.git
git push -u origin master

…or import code from another repository

You can initialize this repository with code from a Subversion, Mercurial, or TFS project.

git pull 报错: fatal: refusing to merge unrelated histories

`git pull origin master --allow-unrelated-histories`

后面加上 --allow-unrelated-histories , 把两段不相干的 分支进行强行合并

上一篇下一篇

猜你喜欢

热点阅读