茫茫網海中的冷日
         
茫茫網海中的冷日
發生過的事,不可能遺忘,只是想不起來而已!
 恭喜您是本站第 1729987 位訪客!  登入  | 註冊
主選單

Google 自訂搜尋

Goole 廣告

隨機相片
IMG_0071.jpg

授權條款

使用者登入
使用者名稱:

密碼:


忘了密碼?

現在就註冊!

軟工藝術 : [轉貼]Bitbucket + SourceTree 基礎教學

發表者 討論內容
冷日
(冷日)
Webmaster
  • 註冊日: 2008/2/19
  • 來自:
  • 發表數: 15773
[轉貼]Source Tree 簡介

Source Tree 簡介

1 什麼是 Source Tree ?

1.1 下載

1.2 SourceTree 介面簡介

  • Bookmarks 介面


SourceTree-Bookmarks-view.png

  • 主要介面

SourceTree-main-view.png

1.3 git 指令/狀態圖

git-local-remote.png

  • working dictionary 目前 git 正在工作的目錄
  • staging area 準備要 commit 的東西
  • local repo 本地端的 git 資料庫
  • remote repo 遠端的 git 資料庫

2 SourceTrees 超簡單使用


2.1 設定 git 使用的 Email

設定全域的使用者資訊

SourceTree-email.png

  • Command line 指令


git config --global user.name "username"
git config --global user.email "username@yooo.com"

2.2 開始新的 git 專案

最後面代入要產生的目標,若目標不存在會建立一個新的資料夾

SourceTree-CreateProject.png

  • Command line 指令


git init hello-git
> Initialized empty Git repository in ~/hello-git/.git/

2.3 開始舊專案開發

抓下個一個叫作 example 的專案,並且取名為 example

  • Command line 指令


git clone "http://github.com/user/example.git" example

2.4 把目前修改的東西記錄下來

把目前有記錄到的檔案,加上一個新的 commit,內容是 "Init commit"

SourceTree-CommitView.png

  • Command line 指令


git commit --all -m "Init commit"

2.5 抓取最新的程式碼 (Pull)

選擇 Pull 後,再選擇要 Pull 的 branch
可以選擇自動 merged,就會把 local 的部份和 remote 做 merge

SourceTree-Pull-View.png

  • Command line 指令


git pull

2.6 上傳變更的部份 (Push)

選擇 Push, 再選擇要 push 的 repository(remote),下面可以選擇需要 push 的 branch

SourceTree-Push-View.png

  • Command line 指令


git push origin

Date: <2013-08-10 Sat>

Author: Superbil

Created: 2013-08-27 Tue 23:26

Emacs 24.3.1 (Org mode 8.0.7)


原文出處: Source Tree 簡介
前一個主題 | 下一個主題 | | | |

討論串




Powered by XOOPS 2.0 © 2001-2008 The XOOPS Project|