Skip to Content
Git 團隊使用手冊
book

Git 團隊使用手冊

by Emma Jane Hogbin Westby
December 2016
Beginner to intermediate
352 pages
6h 10m
Chinese
GoTop Information, Inc.
Content preview from Git 團隊使用手冊
單人團隊
|
103
如果需要執行的是「
真正的合併
」(
true merge
)而不只是快轉(fast-forwarding)歷史
紀錄的話,就會顯示輸入記錄訊息的編輯器。筆者一般會保留原有的訊息,等到成果被
合併到
master
分支之後,就應該將
master
分支推送回遠端分支:
$ git push --set-upstream my_gitlab master
將更動合併到
master
分支之後,就沒有理由再留下工單分支,為了維持儲存庫的整潔,
現在就可以刪除工單分支(範例 5-35)。
範例
5-35 
刪除分支的本機複本
$ git branch --delete 1-process_notes
要是有任何異動還沒合併到其他分支,Git 會瘋狂的抱怨,所以不需要(太過)擔心會
遺失尚未儲存的進度。
最後,你還需要整理遠端儲存庫,應該將異動合併到
master
的遠端分支一併刪除(範例
5-36)。
範例
5-36 
刪除不再需要的遠端分支
$ git push --delete my_gitlab 1-process_notes
做完最後的整理之後,也該是對下個想法重複同樣程序的時候了。
命令參考
5-1 列出了本章使用的命令,這些命令都是在命令列執行,使用的方式與列出的型式
相同。
5-1 基本命令列命令
命令 用途
cd ~
切換到個人家目錄
mkdir
建立新目錄
cd 目錄名稱
切換到特定目錄
ls -a
OS X Linux 作業系統上列出隱藏檔案
dir
Windows 上列出檔案
touch 檔案名稱
用特定名稱建立一個新的空檔案 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

React: Up & Running, 2nd Edition

React: Up & Running, 2nd Edition

Stoyan Stefanov

Publisher Resources

ISBN: 9789864762453