0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

git基本

Last updated at Posted at 2017-11-09

概念図

レポジトリ登録
work dir->(git add)->index->(git commit)->local repository->(git push)->remote repository

レポジトリ参照
remote repository->(git pull)->local repository->(git checkout)->work dir

使用法

作業ディレクトリ作成
mkdir /path/to/your/project
cd /path/to/your/project
レポジトリ初期化
git init
リモートレポジトリ登録
git remote add origin https://hoge@bitbucket.org/hoge/test1.git
origin=リモートレポジトリのalias。慣習的にoriginというだけでunkoとかでもいい

レポジトリに作業ファイル登録
echo "# This is my README" >> README.md
git add README.md
ローカルレポジトリにコミット
git commit -m "First commit. Adding a README."
リモートレポジトリにプッシュ
git push -u origin master

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?