LoginSignup
0
0

More than 5 years have passed since last update.

Aptana3からgithubを操作する

Last updated at Posted at 2017-12-02

すでにgithubにRepositoryを作成していることが前提です。
(今回はREADME.mdファイルのみ存在する状態にしてます)

Apatana3のインストール手順はこちら。

WindowsでのRails開発用にAptana Studioをインストールする手順

githubのrepositoryをcloneする

以下の手順でcloneする。

File > Import > Git - Git repository as New Project

Nextを選択して以下を入力
Username:githubのユーザ名
Password:githubのパスワード
URI:cloneしたいrepositoryのURL
例)https://github.com/bosoboso/GitHubTest.git
→https://github.com/[ユーザ名]/[Repository名].git

これで指定したフォルダにREADME.mdと.gitフォルダが出来ているはずです。
また、Aptana3のプロジェクトエクスプローラーにもgithubのRepository名でプロジェクトが作成されていると思います。

プロジェクトを編集する

コマンドプロンプトを起動します。
画面上部のターミナルアイコンをクリックすると、プロジェクトディレクトリをカレントディレクトリにしてターミナルが画面下部のペインに表示されます。
スクリーンショット 2017-12-03 00.47.46.png

ターミナルに以下コマンドを入力し、とりあえず動くものを作ってみます。

>cd ..
>rails new GithubTest
>cd GithubTest
>rails g scaffold GithubTest user name:text id:integer
>rails db:migrate
Gemfileに「gem 'coffee-script-source', '1.8.0'」を追記
>bundle update coffee-script-source
>rails s

この状態でAptana3のメニューから
Window > Show View > Web Browserでブラウザタブを表示し、
URLに以下を入力すると、↓のような画面が表示されるはずです。

http://localhost:3000/users

スクリーンショット 2017-12-01 19.29.46.png

githubにpush(アップロード)する

ターミナルから以下を入力。

>git add . 
>git commit
コミットメッセージ入力(デフォルトではviエディタが起動します)
面倒な場合はgit commit -m "Test commit"のようにオプションでメッセージを入力します
>git push
このあとgithubのユーザ名とパスワードを聞かれるので入力する

これでgithubにアップロードされます。

(ただAptana3上でコマンド入力しただけだった・・・。)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0