1、 在網頁git上覆制位址,git clone專案位址,把檔案拉到本地。
2、git branch fix_usb_bug //建立乙個fix_usb_bug的分支,分支的名字必須有意義.
3、git checkout fix_usb_bug//切換到fix_usb_bug分支,專案開發時在這個分支上。
4、開發過程中肯定對**進行修改,本人測試確認沒有問題之後
5、git add 修改/新增的檔案 //git add. 新增所有的修改的檔案
6、git commit //新增修改描述
接下來的操作按照以下步驟:
$git checkout master //切換本地master
$git fetch origin master //下拉伺服器最新**
$git merge origin/master //把伺服器最新**merge到master中,origin/master是固定名稱
$git checkout fix_usb_bug //切換到fix_usb_bug分支,我們的修改都是在fix_usb_bug分支進行的
$git rebase master //把fix_usb_bug分支與master分支進行行衍合,結果就是
master
分支的變化融合到
fix_usb_bug
中$ git checkout master //
切換到本地
master
$ gitmerge fix_usb_bug //
把fix_usb_bug
分支的變化上合併到
master
分支,結果就是
fix_usb_bug
分支的變化融合到
master
中$ gitpush origin head:refs/for/master //
將change
上傳至伺服器等待評審,提交
master
分支有時候圖形化工具更容易展示歷史提交的變化,隨 git 一同發布的 gitk 就是這樣一種工具。它是用 tcl/tk 寫成的,基本上相當於git log
命令的視覺化版本,凡是git log
可以用的選項也都能用在 gitk 上。在專案工作目錄中輸入 gitk 命令後,就會啟動介面。
我們一般常用的是gitk影象化介面。
git使用步驟
git 使用步驟 1 建分支 project team switch to new branch 2 提交分支 注意 提交分支前必須先pull project team pull 1 project team commit commit and push 2 project team remote ...
git使用步驟
首頁要在github上建立乙個使用者名稱 1.git init 2.在github.com 建立乙個倉庫 右上角 new respository 書寫倉庫名稱和描述 提交 3.把本地 推到遠端倉庫git add git commit m 寫一句描述 git remote add origin git...
git使用步驟
1報名出處 2.建立專案資料夾 mkdir test 3.建立版本庫 git init 4.命令操作 提交版本 git commit m 備註 a.php 修改 git commit am 備註 a代表修改所有的檔案 新增所有的改變 git add a 刪除檔案 git rm a.php 轉殖 ss...