git远程仓库的操作方法
  • 2017-08-08

Quick setup — if you’ve done this kind of thing before

or HTTPS SSH git@github.com:adymilk/materializecss-admin-management.git

We recommend every repository include a README, LICENSE, and .gitignore.

or create a new repository on the command line

1
2
3
4
5
6
echo "# materializecss-admin-management" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin git@github.com:adymilk/materializecss-admin-management.git
git push -u origin master

or push an existing repository from the command line

1
2
git remote add origin git@github.com:adymilk/materializecss-admin-management.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.

如果远程仓库与本地仓库存在冲突

1
2
3
4
5
//先把远程仓库代码拉下来
git pull git@https://github.com/adymilk/project

//在重新push
git push origin master

强制合并

1
git push origin master --force

代码回滚

1
git reset --hard 【版本号】
感谢您的阅读,本文由 三步枫|三步枫的个人网站 版权所有。如若转载,请注明出处:三步枫|三步枫的个人网站(https://blog.adymilk.cn/2017/08/08/git远程仓库的操作方法/
hexo 向百度主动推送链接
Git 简易入门指南

” 打赏了的人都会变美~ “