git note

note to git..

修改账户

1
2
3
git config --global user.name "username"

git config --global user.email "email"

这个配置修改提交代码的贡献者。

如果更换了账号且使用https的情况下,push还是会使用原账号,出现权限失败问题。

1
2
remote: Permission to *.git denied to *.
fatal: unable to access 'https://github.com/*.git/': The requested URL returned error: 403
  • 编辑控制面板-用户-Windows凭据下的git:https://github.com账号及密码即可。
  • 改用ssh方式即可。

fork仓库保持原仓库一致

添加一个remote源,使用该源来更新代码即可

1
2
3
git remote add upstream "origin.git"
git fetch upstream
git merge upstream/master

数学表达式

https://www.codecogs.com/latex/eqneditor.php