使用 GitHub

这个礼拜比较悠闲, 准备用三天时间研究一下怎么用 GitHub.
新建主页: https://github.com/zhangyu19881125?tab=repositoriesgit

在本地建立新目录github

mkdir -p ~/git/testing ; cd ~/git/testing
touch test_file

在本地建立git 分支web

git config --global user.name "zhangyu19881125"
git config --global user.email "zhangyu19881125@gmail.com"
view ~/.gitconfig 或者 git config --list
initial project version
git commit --amend --reset-author
git init
git add .
git commit -m "Initial Commit" -a 或者 git commit -m "Initial Commit" file

上传到服务器
在 GitHub 主页建立新的 Repository “test2”ruby

or create a new repository on the command line

echo "# test2" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/zhangyu19881125/test2.git
git push -u origin master

…or push an existing repository from the command line

git remote add origin https://github.com/zhangyu19881125/test2.git
git push -u origin master

从服务器拉取bash

cd
cd git
git clone https://github.com/zhangyu19881125/ShellScript.git

本地修改并提交 github服务器

mkdir bash
cd bash
git add .
touch test_file
git add test_file
git commit -m "add test_file" -a
git push origin master

刚发现 VSCode 自带 Git 功能. 那用起来就更方便了.svg