Last active
January 6, 2016 02:34
-
-
Save onocom/81bb5c73a0d6ef431634 to your computer and use it in GitHub Desktop.
Gitの基本的な使い方めも
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Git使い方メモ | |
| // @see http://www.backlog.jp/git-guide/intro/intro1_1.html | |
| // version check | |
| git --version | |
| // settings --------------------------------------------------------- | |
| // username | |
| git config --global user.name "<ユーザ名>" | |
| // useremail | |
| git config --global user.email "<メールアドレス>" | |
| // color | |
| git config --global color.ui auto | |
| // コマンドエイリアス | |
| git config --global alias.co checkout | |
| // Windows用設定 | |
| git config --global core.quotepath off | |
| // use --------------------------------------------------------- | |
| // リポジトリ作成 | |
| git init | |
| // 状態確認 | |
| git status | |
| // ファイルをリポジトリに追加 | |
| git add <filename> | |
| or | |
| git add . // 全部追加 | |
| // コミット | |
| git commit -m "<コメント>" | |
| // 変更履歴確認 | |
| git log | |
| // リモートリポジトリの登録 | |
| git remote add origin https://<URL> | |
| // リモートリポジトリからのPULL(ローカルリポジトリを更新する) | |
| git pull origin master | |
| Username: <ユーザ名> | |
| Password: <パスワード> | |
| // リモートリポジトリへPUSH(更新を通知する) | |
| git push -u origin master | |
| Username: <ユーザ名> | |
| Password: <パスワード> | |
| // リポジトリの複製 | |
| git clone https://<URL> tutorial2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment