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リポジトリ作成

Posted at

流れ

  • centos上にリモートリポジトリ作成
  • 作業端末上にSourcetreeをインストール
  • sourcetreeの設定

centos上にリモートリポジトリ作成

以下コマンドを実行

mkdir test.git
cd test.git
git init
git status

ファイルをtest.git配下においた状態で、以下コマンドを実行すると、リポジトリにファイルが追加される。
その後、commitを実行。

git add .
git status
git commit -m "registaration test.txt"
git status

commitコマンドに-aをつけると、addからやってくれる。

git commit -a -m "registaration test.txt"
git status

作業端末上にSourcetreeをインストール

sourcetreeのインストーラを導入するだけ。
gitを事前に入れておく必要があったはず。

sourcetreeの設定

リモートリポジトリのパスは、以下でうまくいった。
ポート番号は必要なかった。
認証の画面がうまく表示されず、最初はgitを認識しなかった。

ssh://root@(IPアドレス)/(ディレクトリパス)

pushをするために、リモートリポジトリ側に、以下設定が必要。
falseになっていると、リモートリポジトリを更新できないのでtrueに変更。
.gitがある場所でやればよい?はず。

git config --get-all core.bare
git config --bool core.bare true

参考

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?