› Ruby 勉強会 › TryGit
TryGit
2013年08月13日
http://try.github.io
基本的なコマンドを覚えたらオプションも覚えよぉ~!
git branch+git checkout = git checkout -b みたいなやつ。
1.1 Initializing
$ git init
1.2Checking the Status
$ git status
1.3 Adding & Committing
$ git status
1.4 Adding Changes
$ git add octocat.txt
1.5 Checking for Changes
$ git status
1.6 Committing
$ git commit -m "Add cute octocat story"
1.7 Adding All Changes
$ git add '*.txt'
1.8 Committing All Changes
$ git commit -m 'Add all the octocat txt files'
1.9 History
$ git log
1.10 Remote Repositories
$ git remote add origin https://github.com/try-git/try_git.git
1.11 Pushing Remotely
$ git push -u origin master
1.12 Pulling Remotely
$ git pull origin master
1.13 Differences
$ git diff HEAD
1.14 Staged Differences
$ git add octofamily/octodog.txt
1.15 Staged Differences (cont'd)
$ git diff --staged
1.16 Resetting the Stage
$ git reset octofamily/octodog.txt
1.17 Undo
$ git checkout -- octocat.txt
1.18 Branching Out
$ git branch clean_up
1.19 Switching Branches
$ git checkout clean_up
1.20 Removing All The Things
$ git rm '*.txt'
1.21 Commiting Branch Changes
$ git commit -m "Remove all the cats"
1.22 Switching Back to master
$ git checkout master
1.23 Preparing to Merge
$ git merge clean_up
1.24 Keeping Things Clean
$ git branch -d clean_up
1.25 The Final Push
$ git push
Posted by kanedayo at 01:07│Comments(0)