Skip to content

Latest commit

 

History

History
61 lines (51 loc) · 1.12 KB

git-guide.md

File metadata and controls

61 lines (51 loc) · 1.12 KB

git 基础操作指引

git config user.email "xxx@mail.com"
git config user.name "xxxuser"

设置 git 代理

git config http.proxy 'http://127.0.0.1:7890'
git config https.proxy 'http://127.0.0.1:7890'

取消 git 代理

git config --unset http.proxy
git config --unset https.proxy

同步上游 参考步骤

第一步:查看所有远程库的远程地址

git remote -v

第二步:添加源分支 URL

git remote add upstream git@github.com:oss-know/airflow-jobs.git

第三步:检查所有远程库的远程地址

git remote -v

第四步:从源分支获取最新的代码

git fetch upstream

第五步:切换到主分支

git checkout development

第六步:合并本地分支和源分支

git merge upstream/development (更推荐 rebase)
git rebase upstream/development

第七步:Push 到 Fork 分支

git push

最重要的三个git操作

git remote add upstream git@github.com:oss-know/airflow-jobs.git
git fetch upstream
git merge upstream/development