Git

前提条件

  • 事前にbrewとgitが使えるようになっている必要があります
  • コマンドラインの作業です
  • 対象OSはMacです

手順

$ brew install curl --with-ssl --with-libssh2
$ brew list curl
curlについてずらっと表示されればOK。パッケージがない場合は"Error"となる。
$ brew list git-ftp
git-ftpが表示されればOK。

gitの初期設定

$ cd ~/Git管理したいディレクトリ
$ git init
$ git config --global user.name 名前
$ git config --global user.email メールアドレス
$ git config git-ftp.user FTPユーザー
$ git config git-ftp.url ftp://ftp.example.com/path
$ git config git-ftp.password FTPパスワード
$ git config git-ftp.connections 10

gitリポジトリの作成

$ touch test.txt
$ git add .
$ git commit -m "1st commit"
$ git ftp push
There are 1 files to sync:
[1 of 1] Buffered for upload 'test.txt'.
Uploading ...
Last deployment changed to 9db4812a1c6cfe3168dc69b71a0b23144f5c4744.

↑こんな感じでアップロードされます。

ちなみに

FTPサーバー上には.git-ftp.logというのがあり、commit ID?が書かれているだけですので、リポジトリ管理はローカル管理となります。

参考URL

インストールの仕方

http://wp-d.org/2014/02/26/5709/

使い方

http://chun-oki.sw8field.com/webworks/20140419/2136.html


トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2022-06-30 (木) 01:40:11