查看“GitHub”的源代码
←
GitHub
跳到导航
跳到搜索
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
===GitHub Person=== * https://github.com/ldscfe * https://github.com/ldscf === 价格计划(免费版) === *Free **The basics for individuals and organizations *Unlimited public/private repositories **Host open source projects in public GitHub repositories, accessible via web or command line. Public repositories are accessible to anyone at GitHub.com. *2,000 automation minutes/month **Free for public repositories **Use execution minutes with GitHub Actions to automate your software development workflows. Write tasks and combine them to build, test, and deploy any code project on GitHub. *500MB of Packages storage **Free for public repositories **Host your own software packages or use them as dependencies in other projects. Both private and public hosting available. *New Issues & Projects (beta) **Community support **免费(个人)版支持无限个数的私有(或公有)仓库, 每月2000分钟的自动构建时长, 单仓库最大 500M. **查看详情: https://github.com/pricing **CI/CD,全称:持续集成 (Continuous Integration) ,持续部署 (Continuous Deployment) ,是开发流程的自动化利器 === Git === *当前机器中有 id_rsa *远程 github 中已加载 id_rsa.public(settings -> Access -> SSH &GPG keys) === INIT === *git init **在当前目录下建立 .git 目录 **clone 的目录在此目录下 git config --global user.name ldscfe git config --global user.email ldscfe@gmail.com git config --global color.ui true # git status等命令自动着色 # git config --list # 自动判断提交位置(clone多个库) git config --global push.default matching === Repository === # clone 远程仓库 git clone git@github.com:ldscfe/pangolin.git # token Settings -> Developer Settings -> Personal access tokens -> tokens(classic) # 记录 token git clone https://<Token Name>:<Token>@github.com/ldscfe/devudefj2.git # 刷新 git pull # 增加文件 git status # 查看文件状态 git add $FN git add . # 所有 # 提交 (需要 git add) git commit -m "comment content" git push # 去除文件&目录: .gitignore,已 git add 的文件,在 .gitignore 中标识无效 log/ target/ src/test/ .DS_Store .gitignore git rm -f ${FN} # 已 git add 的文件,删除后.gitignore 中标识有效 # 分支之间切换、恢复文件、创建新分支等 git checkout <branch-name> # 从当前分支切换到指定的分支 <branch-name>, 或主分支:master git checkout - # 快速切换回前一个分支 git checkout -- <file> # 将指定文件 <file> 恢复到最新的提交状态,丢弃所有未提交的更改 git checkout -b <new-branch-name> # 创建一个新分支 <new-branch-name> 并切换 ... # Creating remote repositories git remote add ldscfe_cpp git@github.com:ldscfe/cpp.git git remote add ldscfe_pangolin git@github.com:ldscfe/pangolin.git git remote add ldscfe_udefpy3 git@github.com:ldscfe/udefpy3.git #You can use the command git remote set-url to change a remote's URL. git remote set-url <REMOTE_URL> # 需要指定下推同步的项目 git config --global push.default matching === Public Effect === settings -> Danger Zone -> Change visibility * The code will be visible to everyone who can visit https://github.com * Anyone can fork your repository. * All push rulesets will be disabled. * Your changes will be published as activity. * Actions history and logs will be visible to everyone. === Error === * RSA 证书无或错误 git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. * 分支冲突,本地版本陈旧 Automatic merge failed; fix conflicts and then commit the result. # 丢弃本地分支内容 git reset --hard origin/master * fatal: Not a git repository (or any of the parent directories): .git git remote add 时出现,原因:未 git init * fatal: Could not read from remote repository git pull 时出现 ssh_exchange_identification: Connection closed by remote host fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. [[分类:Develop]] [[分类:Doc]]
返回
GitHub
。
导航菜单
个人工具
登录
命名空间
页面
讨论
大陆简体
查看
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
目录
文章分类
侧边栏
帮助
工具
链入页面
相关更改
特殊页面
页面信息