Differences between revisions 4 and 6 (spanning 2 versions)
Revision 4 as of 2020-08-25 09:41:42
Size: 1682
Comment:
Revision 6 as of 2020-08-25 09:59:07
Size: 1980
Comment:
Deletions are marked like this. Additions are marked like this.
Line 41: Line 41:
GitHubの欲しいデータを自分のPCの場所ににコピーする。 Copy the desired data in the existing remote repository (GitHub) to your PC.
Line 44: Line 45:
% git clone HTTPS % git clone HTTP
Line 47: Line 48:
自分のPCにおいてコピーしたデータフォルダはローカルリポジトリです。
編集、変更、リモートリポジトリへのデータ反映は、ローカルリポジトリで行います。
The data folder you copied on your PC is '''''the local repository'''''.

Change and reflect the data to the remote repository are done in the local repository.

The following is the procedure for reflecting data to the remote repository.
Line 51: Line 55:
変更を登録する The command used to add files or directories to the index.

In '''''file''''', enter the changed file name that you want to reflect the data (Eg "hello.py")
Line 53: Line 60:
% git add '''''file''''' % git add file
Line 56: Line 63:
Command used to write changes to indexed files and folders to the repository.

Enter any message in '''''message'''''. (Eg "add new file")
Line 57: Line 68:
% git commit -m "messeage" % git commit -m "message"
Line 59: Line 70:
リモートリポジトリを変更する。
Reflect the changed data to the remote repository (GitHub).
Line 63: Line 76:
このときgithubのユーザー名パスワードが聞かれるため、入力する。

At this time, the github user name password is asked, so enter it.

How to use git and GitHub

GitHub is the software platform. We used GitHub and shared the code.

Create an account for GitHub

Initial settings of git

Register user name and address name on the terminal.Type any name and address for AnyName and AnyAddress.

% git config --global user.name AnyName
% git config --global user.email AnyAddress

% git config --global core.editor emacs

Now, when you edit a message in Git, Emacs starts, regardless of your shell's default editor.

https://git-scm.com/book/ja/v2/Git-%E3%81%AE%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%9E%E3%82%A4%E3%82%BA-Git-%E3%81%AE%E8%A8%AD%E5%AE%9A

If you want to check it, type the following command.

% git config --list

Clone the repository

Get source code from an already existing remote repository.

To do so, type the following command.Type

Copy the desired data in the existing remote repository (GitHub) to your PC.

% git clone HTTP

The data folder you copied on your PC is the local repository.

Change and reflect the data to the remote repository are done in the local repository.

The following is the procedure for reflecting data to the remote repository.

The command used to add files or directories to the index.

In file, enter the changed file name that you want to reflect the data (Eg "hello.py")

% git add file

Command used to write changes to indexed files and folders to the repository.

Enter any message in message. (Eg "add new file")

% git commit -m "message"

Reflect the changed data to the remote repository (GitHub).

% git push

At this time, the github user name password is asked, so enter it.

KAGRA/Subgroups/MIF/Simulation/KamikokaActivity20200817/how_to_use_git_and_github (last edited 2020-08-25 10:04:28 by chiaki.hirose)