Differences between revisions 4 and 5
Revision 4 as of 2020-08-25 09:41:42
Size: 1682
Comment:
Revision 5 as of 2020-08-25 09:56:08
Size: 2844
Comment:
Deletions are marked like this. Additions are marked like this.
Line 41: Line 41:
Copy the desired data in the existing remote repository (GitHub) to your PC.


---- /!\ '''Edit conflict - other version:''' ----
Line 43: Line 47:

---- /!\ '''Edit conflict - your version:''' ----

---- /!\ '''End of edit conflict''' ----
Line 46: Line 54:

---- /!\ '''Edit conflict - other version:''' ----
Line 64: Line 74:

---- /!\ '''Edit conflict - your version:''' ----

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.

---- /!\ '''End of edit conflict''' ----

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.


/!\ Edit conflict - other version:


GitHubの欲しいデータを自分のPCの場所ににコピーする。


/!\ Edit conflict - your version:



/!\ End of edit conflict


% git clone HTTPS


/!\ Edit conflict - other version:


自分のPCにおいてコピーしたデータフォルダはローカルリポジトリです。 編集、変更、リモートリポジトリへのデータ反映は、ローカルリポジトリで行います。

変更を登録する

% git add '''''file'''''

% git commit -m "messeage"

リモートリポジトリを変更する。

% git push

このときgithubのユーザー名パスワードが聞かれるため、入力する。


/!\ Edit conflict - your version:


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.


/!\ End of edit conflict


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