yychenleslie / SoftMatterDiscuss

软物质交流,讨论。
7 stars 0 forks source link

Github和git的使用方法 #3

Open HuangJiaLian opened 4 years ago

HuangJiaLian commented 4 years ago

如何在Window, MacOS下安装,使用git?

fqinglee commented 4 years ago

git的安装和配置

安装

Windows

  1. 下载Git SCM 安装包。下载链接
  2. 双击安装, 选择安装路径。安装过程中不过不清楚的直接默认下一步即可。也可以根据自己的需求选择打勾。
  3. 安装完成之后,在CMD中输入 git --version,可以看看安装是否成功,看看版本。

macOS

Linux(Ubuntu)

命令行内输入sudo apt install git即可成功安装git。

配置

这里所说的配置主要是邮箱,ssh-key的配置。首次使用git需要 配置ssh-key.

具体步骤: 参考链接

  1. Todo
  2. Todo
  3. Todo
HuangJiaLian commented 4 years ago

git的使用

基本1

step1: create a new repository in Github (Repositories--new) step2: clone it to your computer in the terminal: git clone + path(copy from Github such as:git@github.com:yychenleslie/usage_github.git) step3: enter this repository in the terminal: cd + document name(such as usage_github) step4: (1): if you need to create a new procedure, you can : in the terminal: code . (2): if you want to move something you want: in the terminal: cp *** .

基本2

step1: git add+ document name (add the modified file) step2: git status(check the status) step3: git commit -m 'description' step4: git push

@yychenleslie

974918051 commented 4 years ago

关于在macOS下安装git的方法:

一、通过homebrew安装Git