Git使い方 2歩目 コマンド編

Git使い方 1歩目 コマンド編の続き

フォルダ内は
folder
– sample.txt

間違えてsample.txtを修正してしまった..

前回commitしたところまで戻すには
git checkout — sample.txt

間違えてsample.txtを修正してしまい、git add までしてしまった..

git add を取り消すなら
git reset — HEAD sample.txt

git add したものすべてを取り消すなら
git reset HEAD

前回commitしたところまでまで一気に戻すには
git reset –hard HEAD

間違えたcommitを取り消したい..
git reset –hard HEAD^

間違えたcommitを2つ取り消したい..
git reset –hard HEAD^^

ChromeAppsからのFeedlyにつながらない

chrome://apps
にインストールしてるFeedlyからFeedlyに突然繋がらなくなった

chrome-apps

Feedlyアイコンをクリックすると

feedly-error

画像も出ない?
AdBlockとか入れてない..

調べたらhttps://feedly.com/
にするとつながりました

chrome://apps
画面からつなげるには、Feedlyアイコンを右クリック
Load feedly over HTTPS を yes にしてSaveするとできます

chrome-feedly

Feedlyなくなると困ります

Git使い方 1歩目 コマンド編

Git初めの設定 コマンド編の続き

git管理したいフォルダが有るとして

folder
– sample.txt

移動
cd folder

フォルダをgit管理に
git init

git管理下にする
git add sample.txt

フォルダ内すべてなら
git add .

状態を見る
git status


# On branch master
#
# Initial commit
#
# Changes to be committed:
# (use "git rm --cached ..." to unstage)
#
# new file: sample.txt

sample.txtが認識されました

これでは登録一歩前なので

コメントをつけて登録
git commit -m ‘sample.txtを追加’

状態を見る
git status


# On branch master
nothing to commit (working directory clean)

未登録のものはなくなりました

履歴を確認
git log


commit d8356f2b6a6e8c7a9ec9244ec57833c63fe5a13b
Author: bgbgbg <sample@sample.jp>
Date: Tue Mar 11 21:14:55 2014 +0900

sample.txtを追加

これで1人でもバージョン管理ができます

Git初めの設定 コマンド編

git初めの設定

()の中は、好きなものを
alias はおこのみで
core.quotepath off はWindowsのファイル名文字化け対策
core.editor はお好きなものを


git config --global user.name (name)
git config --global user.email (email address)
git config --global color.ui auto
git config --global alias.co checkout
git config --global alias.cm commit
git config --global alias.ss status
git config --global core.quotepath off
git config --global core.editor vim

設定を確認するには
git config –global –list