栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

git同步github

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

git同步github

#clone github 远程仓库
git clone https://github.com.cnpmjs.org/github_username/hudi.git

git remote -v
#origin    https://github.com.cnpmjs.org/github_username/hudi.git (fetch)
#origin    https://github.com.cnpmjs.org/github_username/hudi.git (push)
#upstream    https://github.com.cnpmjs.org/apache/hudi.git (fetch)
#upstream    https://github.com.cnpmjs.org/apache/hudi.git (push)

#进入到hudi目录后添加Apache Hudi为upstream


# 添加一个远程仓库(https://github.com.cnpmjs.org/apache/hudi.git) 简写为upstream
git remote add upstream https://github.com.cnpmjs.org/apache/hudi.git
#配置用户名、密码
git config user.name github_username;   git config user.email useremail

#将远程仓库(upstream master分支)中有但是在当前仓库的没有的所有信息拉取下来然后存储在你本地仓库中
git fetch upstream master

#合并远程仓库(upstream master分支)新的部分到本地仓库中
git merge upstream/master

#来同步 apache仓库 master分支的修改至自己远程仓库的 master分支
#将本地的 master 分支推送到 origin 主机的 master 分支
git push origin master


username:useremail
alias: gitLearnPAT
password: userpassword


git references: 
https://www.runoob.com/git/git-fetch.html
https://www.atlassian.com/git/tutorials
fork github to gitee(https://blog.gitee.com/2018/06/05/github_to_gitee/)

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/270478.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号