2016-06-27 21 views
-1

我一直在使用集中存儲庫,直到現在,但最近在工作中我已經移到使用git的項目上。我閱讀了教程,並有一些noob問題。來自新git用戶的問題

從我的理解:

Step 1: git init --bare or create a remote repo (github/stash/etc.) 
Step 2: git clone <repo URL/PATH> 
Step 3: git checkout -b <new_branch> master 
Step 4: git add <file/dir> 
Step 5: git commit -m <msg> 
Step 6: Repeat steps 4 and 5 until new feature is done 
Step 7: git rebase -i master 
Step 8: pick/reword/squash until satisified 

local master branch 
Step 9: git checkout <base_branch> 
Step 10: git merge 

remote repo 
Step 9: pull request from new branch to master 
Step 10: get approval from repo owner 

請糾正我,如果我有錯流。

我很困惑的是,在工作中我們使用Stash。我的同事使用生成的URL從遠程回購克隆。

我的同事給了我他使用的URL,所以我克隆了他的回購。

  1. 我該如何做拉請求?我如何選擇我的分支給主人?
  2. 我該如何讓git remote成爲遠程回購而不是我的同事回購?
+1

我認爲最好先閱讀一些教程,如Pro Git的。 – ElpieKay

+0

請編輯您的標題,說出您的問題實際是什麼。 –

回答

0

簡單地說,你在初始化一個混帳回購協議後,當地 您首先需要將鏈接添加到原始地址 即git remote add origin "Remote repo link"。 您可以通過輸入git remote -v來查看是否添加了源鏈接。 從源頭上拉很簡單,只要git pull origin master

0
  1. 藏匿現在咬鬥服務器,但是拉的請求應通過their gui相似。

  2. 您更改URL爲遠程與set-url

    git remote set-url origin [email protected]: username/yourrepo.git