本地使用git

初始化一个Git仓库,使用git init命令。
添加文件到Git仓库,分两步:
第一步,使用命令git add ,注意,可反复多次使用,添加多个文件;
第二步,使用命令git commit,完成。

要随时掌握工作区的状态,使用git status命令。
如果git status告诉你有文件被修改过,用git diff可以查看修改内容

推送本地到github

echo "# linux_beta" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin git@github.com/<username>/<repository name>.git
git push -u origin master

初次设置ssh

  1. 如果已经存在id_rsa等ssh,可以重新命名一个
  2. 完成这是后初次使用需要config
git config --global user.email "you@example.com"
git config --global user.name "Your Name"

相关文章:

  • 2021-12-10
  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
  • 2021-09-22
  • 2021-04-26
  • 2021-12-22
  • 2021-09-10
猜你喜欢
  • 2021-08-11
  • 2021-08-07
  • 2022-01-14
  • 2021-07-20
  • 2022-12-23
  • 2021-11-19
  • 2021-11-19
相关资源
相似解决方案