Git 一些基本操作

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zhang44429824/article/details/81128745

git一些操作:

1 实现本地仓库项目添加到远程仓库:

将远程仓库与本地仓库关联

git remote add origin http://gitlab.hxdev.cn/*****  

添加本地项目到本地仓库

git add .

提交

git commit -m "****"

推送到远程仓库(首次推送加-u)

git push -u origin master

然后输入账号密码。

如图:

成功:

2 fork别人的代码,同步更新fork的代码

git remote -v git remote add upstream [email protected]:xxx/xxx.git

git fetch upstream

git merge upstream/master

git push

如图:

è¿éåå¾çæè¿°

è¿éåå¾çæè¿°

è¿éåå¾çæè¿°

新建一个库:

1.
echo "# bulkAPIMySQL2SFDC" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/GodLin1994/bulkAPIMySQL2SFDC.git
git push -u origin master.
2.git remote add origin https://github.com/GodLin1994/bulkAPIMySQL2SFDC.git
git push -u origin master

猜你喜欢

转载自blog.csdn.net/zhang44429824/article/details/81128745