1. 從某一功能分支新建乙個自己的開發分支
二. 將master分支clone到本地
三. 切換到自己的開發分支
git branch -a四. 修改後push到遠端倉庫git checkout new_branch
git add -a五. 在後台發起merge requestgit commit
git push
六. 專案管理員對**進行review,確定是否accpet merge
注意:一般開發中是不會直接將自己的開發分支直接合併到master上的,上面僅供測試。
1.從本地當前分支建立新分支
git checkout -b another_new_branch擴充套件:
git checkout -bview codeusage: git checkout [options]
or: git checkout [options] [
] -- ...
-q, --quiet suppress progress reporting
-b create and checkout a new branch
-b create/reset and checkout a branch
-l create reflog for
new branch
--detach detach the head at named commit
-t, --track set upstream info
fornew branch
--orphan new unparented branch
-2, --ours checkout our version for
unmerged files
-3, --theirs checkout their version for
unmerged files
-f, --force force checkout (throw away local modifications)
-m, --merge perform a 3-way merge with the new branch
--overwrite-ignore update ignored files (default)
--conflict conflict style (merge or diff3
) -p, --patch
select
hunks interactively
--ignore-skip-worktree-bits
do not limit pathspecs to sparse entries only
2.將本地分支推送到遠端倉庫
要想和其他人分享某個本地分支,你需要把它推送到乙個你擁有寫許可權的遠端倉庫。
你建立的本地分支不會因為你的寫入操作而被自動同步到你引入的遠端伺服器上,你需要明確地執行推送分支的操作。
換句話說,對於無意分享的分支,你儘管保留為私人分支好了,而只推送那些協同工作要用到的特性分支。
git push origin serverfix3.檢視專案日誌資訊
git log --oneline
Gitlab的使用總結
time 20150408 都用過github,但是它有乙個缺點是必須在外網使用,gitlab就可以讓你安裝到ubuntu的區域網伺服器上。介紹就點到這裡。2013年的時候安裝gitlab還要自行配置資料庫 伺服器等,現在已經可以做到直接使用乙個deb包安裝了。具體的安裝教程在create,revi...
gitlab 搭建和使用 自我總結
1.安裝centos 7,mini install 2.安裝yum源,然後 yum install gitlab ce gitlab ce name gitlab ce repository baseurl gpgcheck 0 enabled 1 3.開始設定gitlab gitlab ctl r...
gitlab使用攻略
一 首次使用授權 git bash裡配置ssh key ssh keygen t rsa c cat ssh id rsa.pub 二 clone專案 git clone git git git branch git branch dev git checkout b dev git reset h...