重要な Git コマンドとチュートリアル

Git コマンドのヘルプを取得する方法

gitヘルプ [-a|–all|-i|–info|-m|–man|-w|–web] [COMMAND]

例: git help git

ブラウザが起動し、HTML でヘルプが表示されます。

ローカル リポジトリのセットアップと初期プッシュの実行:

cd my_project
git init
git add *
git commit -m "My initial commit message"
git remote add origin git@example.com:my_project.git
git push -u origin master

チェックアウトリポジトリ

git clone git://github.com/schacon/grit.git

変更をローカル リポジトリにコミットするには、コミットではなく追加を行うだけです。ローカルブランチ/変更をリモートリポジトリにプッシュしたい場合は、以下のプッシュコマンドを実行してください。

git add --all

git commit --all

git push

リポジトリへのプッシュコマンド

git push <remote> <local branch name>:<remote branch to push into>
git push [--all | --mirror | --tags] [--follow-tags] [-n | --dry-run] [--receive-pack=]
           [--repo=] [-f | --force] [--prune] [-v | --verbose] [-u | --set-upstream]
           [--force-with-lease[=[:]]]
           [--no-verify] [ […]]

その他のコマンドについては、次のリンクを参照してください。

20 個のコマンドを使用した日常的な Git

https://www.kernel.org/pub/software/scm/git/docs/everyday.html

優れた Git チュートリアル

最初に作るチュートリアル1 – http://git-scm.com/docs/gittutorial

2秒で作れるチュートリアル – http://git-scm.com/docs/gittutorial-2.html

さらなるチュートリアル – http://www.vogella.com/tutorials/Git/article.html#firstgit_repostatus

2 responses to “重要な Git コマンドとチュートリアル”

  1. I wanted to thank you for this wonderful read!!
    I definitely loved every bit of it. I have got
    you book-marked to check out new stuff you post…

  2. Wow, this paragraph iѕ pleasant, my younger
    sisster iss analyzing these kinds oof things,
    thus I am going to inform her.

返信を残す