git

リポジトリ作成(リモートとの連動)

git

ローカルのリポジトリとリモートのリポジトリを連動させる方法について記述 1. リモートリポジトリの作成 以下、リモートサーバで実施。(/organization) $ mkdir sample-repo.git $ sample-repo.git $ git --bare init --share ※サーバ管理者ではなくて、リ…

本流リポジトリへの追いつき

git

本流のリポジトリの変更を取得し、フォーク先を最新化する。 1. 本流リポジトリの追加 (対象ディレクトリで) $ git remote add upstream http://main.git.local/main/repository.git 2. 本流リポジトリ(upstream)からfetchしてブランチの確認 $ git fetch up…

.gitignoreの反映

git

1. ローカルのgitのキャッシュを削除する $ git rm -r --cached . 2. コミット $ git add . $ git commit -m "resync git repo with new gitignore file" 3. 反映(orgin/masterのケース) $ git push origin master