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 3 years have passed since last update.

Git〜pushしてみよう〜

Posted at

それでは、前回のGitを実際にPushして共有したいと思います。
前回はリモートリポジトリで作業している状態なので、まだ共有されていません。これを共有する場合はリモートリポジトリに上げる必要があります。
ごっちゃになりやすいので、整理しときましょう。
前回の記事はこちらをどうぞ▶https://qiita.com/akari_0618/items/1b444870e08c7893498e

今回はGit上にある、プロジェクトに入りたいと思います。
リポジトリには大きく2つありました。すでにあるプロジェクトはリモートリポジトリにあります。ではそれを、個人で作業するローカルリポジトリに追加していきたいとおもいます。

git clone

これは、git上にあるリポジトリをクローンすることができます。
ここでターミナルを開き、入力します。

% git clone "SSHコピー"

を行います。多分このあたりで秘密鍵を入力することになるかなと思います。
すると自分のパソコンの中にリポジトリを引き入れることができましたね。
そしてここから、cdコマンドを使い、リポジトリの中に入ります。

% vim index.html or code .

で修正を行います。(個人的に使いやすいなって思ったのはVSコードでした)
中身を確認する場合は、cat index.htmlで確認することができました。

% git add index.html
% dit commit -m '修正内容'
% git log
% git push origin ブランチ名

リモートリポジトリに上げることができます👍

以上がPushまでの流れです😃

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?