Warning: Use of undefined constant is_robot - assumed 'is_robot' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 594
[git]Coda2でgitを設定してWordPressのテーマファイルをバックアップする方法 | Exception Code.
Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1854

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1855

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1861

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1864

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1865

Exception Code.

iPhone、Macと読書が大好き。iPhone・Mac・書評を中心に好きな事を書いていました。今は『ほーくブログ』でブログを書いています。

[git]Coda2でgitを設定してWordPressのテーマファイルをバックアップする方法

   

NewImage

ブログのテーマを作り直していろいろしています。家ではiMac、外ではMacBook Airを使って作業しているのですが、いちいちサーバーから最新のファイルを持ってくるのが非常にめんどくさいです。時々サーバーから最新ファイル持ってくるの忘れて古いファイルをアップしちゃったりして白目になります。

このままではめんどくささがヤバイので、なんか解決方法はないのかと探してみたら、今持ってるテキストエディタのCoda2とgitが連携可能だと発覚。相当喜んでいたんですが、結構設定につまづいてしまったので設定方法をここに書いとこうと思います。

Coda2でgitを使えるようにするための下準備

僕の作りたい環境なのですが、iMac⇔git⇔MacBookAirという感じなので、ローカルからgitにテーマファイルをアップできる環境を作ります。
ローカルにWordPressの環境を作るときのやり方は先日記事にした方法でやれば簡単です。

[Mac]WordPressの本番環境をそのままローカルに移行する方法

gitのリポジトリを作成する

まずはリポジトリの作成。githubでもなんでもいいのですが、僕はgitBREAKを使ってプライベートリポジトリを作ります。

無料でプライベートリポジトリをゲットできるgitBREAKがかなり使える

Coda2でサイトを登録する

Coda2でgitを使えるようにするには、サイト(自分の場合はブログ)の登録を行っておく必要があります。サイトの登録方法ですが、Coda2の[サイト]をクリックし、下の画像にある左下の矢印をクリックすると登録画面が表示されるので登録。

Coda2でサイトを登録する

gitで管理をする際には、リモートルートとローカルルートの設定が必須です。

リモートルート

/home/hawk-a/www/WordPressフォルダ/wp-content/themes/gitで管理したいテーマファイルフォルダ/

ローカルルート(MAMPの場合)

/Volumes/Macintosh HD/Applications/MAMP/htdocs/WordPressフォルダ/wp-content/themes/gitで管理したいテーマファイルフォルダ

設定を入力したら、同じウィンドウの[ソース管理]を選択します。

Coda2 ソース管理

うまく設定ができてればボタンが押せるようになってるはずなので[空のGitリポジトリを作成…]をクリック。そうすると、ローカルルートで入力したフォルダの中に.gitフォルダ(不可視)が作成されます。

コミットを行う

ここまでの設定ができたら、Coda2でSCMでcommitを行いましょう。

Coda2 SCM

SCMをクリックしてやると、ローカルルートの中身がずらーっと表示されると思います。gitに上げたいファイルを[追加]→[コミット]してやります。分かんなかったら、とりあえず全部コミットでいいと思います。これで準備OK。

Header php Exception Code

gitにコミットしたファイルをpushする

次に、commitしてやったファイルをpushします。

gitBREAKで作ったリポジトリが空のときは、Coda2からpushできませんでした。githubならできるのかな?なので最初はターミナルからコマンドでpushします。

cd ローカルリポジトリのディレクトリ

git commit -m "first commit"
git remote add origin リポジトリのURL(.git)
git push -u origin master

すると、いい感じにファイルがgitに反映されているはず。
ここまでをiMacでやればあとはMacBook Airに持ってくるのも超簡単。設定で入力したリモートリポジトリにも.gitが作成されているのでCoda2からpushができるようになってます。

git clone リポジトリのURL

あとは作業したらCoda2からgitにpushしてやりさえすればOK。古いファイルをサーバーに上げちゃったりしてもすぐ戻せて安心です。

Coda 2

6,500円
(2013.09.06時点)
posted with ポチレバ

 - WordPress, 開発/プログラム

  関連記事

bloggerXcode-icon-375x375-75.png
[XCode 4.3]Text Fieldの入力が終わったら次のText Fieldにソフトウェアキーボードでカーソルを移動させて最後にボタンを押す方法

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1854

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1855

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1861

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1864

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1865

XCodeをしこしこやっております。ほーく(@hawk_a)です。 プログラムの …

bloggerXcode-icon-375x375-75.png
[XCode]Title set but using a system Identifierなる警告が出たときの対処法

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1854

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1855

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1861

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1864

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1865

最近iPhoneアプリ開発を始めた@hawk_aです。 StoryBoardを使 …

bloggerXcode-icon-375x375-75.png
[XCode]UINavigationBarにUIBarButtonItemでボタンを追加する方法

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1854

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1855

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1861

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1864

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1865

アプリ開発には欠かせないナビゲーションバー。 UINavigationBarにボ …

bloggerXcode-icon-375x375-75.png
[XCode]追加してインポートしたヘッダーファイルが見つからないときの対処法3つ

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1854

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1855

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1861

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1864

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1865

XCodeでインポートの宣言をした際(import <hoge.h> …

WPtouchを使っててもGoogleAnalyticsのアクセス解析の設定をする必要があるようなので血眼になって設定したからやり方書いたよ!

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1854

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1855

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1861

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1864

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1865

ブログをやってると、やっぱりどれくらいの人が見てくれてるのか気になっちゃう僕。 …

[WordPress]いつ、どのブログ記事にアクセスされたかがすぐわかるプラグイン「Post Views」

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1854

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1855

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1861

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1864

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1865

ブログを書いていると、どうしても気になってしまうのがアクセス数。 主にアクセス解 …

WordPressのブログテーマを自作しちゃった!結構簡単だぞ!

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1854

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1855

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1861

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1864

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1865

Create – Wallpaper / jbuc どうも、@haw …

信じられないほど簡単にオブジェクト指向って何?を解決してくれる本

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1854

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1855

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1861

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1864

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1865

「俺がやらなきゃ誰かやる」が合言葉の社会に生きている僕です。分からないことを分か …

bloggerXcode-icon-375x375-75.png
[XCode]ARC使用中にエラー「EXC_BAD_ACCESS」「respondsToSelector」が出た場合の対処法

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1854

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1855

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1861

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1864

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1865

なんでも、このエラーは解放済み(ゾンビ)のインスタンスにアクセスした時に出るエラ …

bloggerXcode-icon-375x375-75.png
[XCode]親子関係じゃないView間で値の受け渡しをする方法

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1854

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1855

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1861

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1864

Warning: Use of undefined constant APP_POST_TYPE - assumed 'APP_POST_TYPE' (this will throw an Error in a future version of PHP) in /home/hawk1/hawk-a.com/public_html/exception_code/wp-content/plugins/post-views/post-views.php on line 1865

@hawk_a 親子じゃないときは、Appdelegateに変数書いてそれを参照 …