Last active
December 11, 2015 12:28
-
-
Save tsubakimoto/4600927 to your computer and use it in GitHub Desktop.
This file contains 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のインストール | |
$ sudo yum -y install git-core | |
Loaded plugins: fastestmirror, security | |
base | 3.7 kB 00:00 | |
base/primary_db | 3.5 MB 00:06 | |
extras | 3.5 kB 00:00 | |
extras/primary_db | 24 kB 00:00 | |
updates | 3.5 kB 00:00 | |
updates/primary_db | 4.3 MB 00:07 | |
Setting up Install Process | |
Package git-1.7.1-2.el6_0.1.i686 already installed and latest version | |
Nothing to do | |
# バージョン確認 | |
$ git --version | |
git version 1.7.1 | |
# 初期設定 | |
$ git config --global user.name tsubakimoto | |
$ git config --global user.email dev.tsubaki@gmail.com | |
$ git config color.ui auto | |
# 予めGithub.comにて空のリポジトリを作成する。 | |
Github.com -> [Create a new repo] | |
# リポジトリをCloneする。 | |
$ git clone git@github.com:tsubakimoto/sample-commit-test.git | |
Initialized empty Git repository in /home/matsumura/sample-commit-test/.git/ | |
warning: You appear to have cloned an empty repository. | |
# 既存のリポジトリにプッシュする。 | |
$ cd sample-commit-test | |
$ touch README.md | |
$ git add README.md | |
$ git commit -m "Added README.md" | |
[master (root-commit) 8a1484b] Added README.md | |
0 files changed, 0 insertions(+), 0 deletions(-) | |
create mode 100644 README.md | |
$ git remote add origin git@github.com:tsubakimoto/sample-commit-test.git | |
$ git push -u origin master | |
Counting objects: 3, done. | |
Writing objects: 100% (3/3), 219 bytes, done. | |
Total 3 (delta 0), reused 0 (delta 0) | |
To git@github.com:tsubakimoto/sample-commit-test.git | |
* [new branch] master -> master | |
Branch master set up to track remote branch master from origin. | |
# リポジトリにREADMEファイルを追加し、コミットとプッシュを行う。 | |
$ cd sample-commit-test | |
$ touch README.md | |
$ git init | |
$ git add README.md | |
$ git commit -m "first commit" | |
$ git remote add origin git@github.com:tsubakimoto/sample-commit-test.git | |
$ git push -u origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment