我們想要啓動一個開源項目並將Git與我的朋友一起使用。我們知道Git,但我們只是用它在/獨自工作之前分出東西。當兩個開發人員在同一個文件上工作並提交,更新等時會發生什麼
比方說,我們已經創建了一個存儲庫。
情況1:
Both of us downloaded repository to our local computers to started working.
I've created A.php, with a function named A() in it. Committed.
My friend created B.php, with a function named B() in it. Committed.
Q1:不更新我們的本地資源庫,但github上存儲的更新。我們如何在不重新下載整個回購的情況下同步它?問題12:開發人員更新其本地存儲庫的頻率如何?我可能會在20:00更新它,但20:05可能會有不同的提交。有更新本地回購的實時解決方案嗎?在這種情況下,就像Dropbox一樣,您可以進行更改並自動將其同步。
情況2
Me and my friend both started working on A.php. The file currently has function A().
I made a function called function B(), committed.
My friend also created a function called B() too. Committed.
Q3:什麼事情發生?第一個提交者是否正常提交,第二個提交者會得到類似「文件已更改,請重新同步文件並在之後提交」的錯誤?
麗莎你打算接受任何你的問題的答案嗎? – AlienWebguy 2013-03-15 17:16:54
@AlienWebguy我不在一段時間。沒有選擇答案,我不會留下任何問題。謝謝你提醒我。 – 2013-03-20 02:34:12