随笔分类 -  Git

摘要:git remote add upstream xxxxx 其中upstream可以修改为任何你觉得可以的名字 阅读全文
posted @ 2023-04-28 17:42 Shiyu_Huang 阅读(47) 评论(0) 推荐(0) 编辑
摘要:git stash git checkout -b new_branch git stash pop git add -A git commit -m "comments" git push 阅读全文
posted @ 2023-04-05 17:11 Shiyu_Huang 阅读(31) 评论(0) 推荐(0) 编辑
摘要:1. git log找到需要回撤的commit_hash 2. 执行git reset --soft commit_hash (这样的话,不会删除最新的代码。如果完全回退到以前版本,可以使用--hard替换--soft) 3. 修改代码,或者删除代码 4.git add -A; git commit 阅读全文
posted @ 2022-05-26 15:39 Shiyu_Huang 阅读(89) 评论(0) 推荐(0) 编辑
摘要:git checkout -b 本地分支名 origin/远程分支名 阅读全文
posted @ 2021-06-29 17:49 Shiyu_Huang 阅读(152) 评论(0) 推荐(0) 编辑
摘要:1.clone最近一次提交 git clone --depth=1 阅读全文
posted @ 2021-06-16 10:11 Shiyu_Huang 阅读(162) 评论(0) 推荐(0) 编辑
摘要:1.公开仓库可以采取替换网址: https://www.zhihu.com/question/27159393 将原本的网站中的http://github.com 进行替换为github.com.cnpmjs.org 2.通过gitee进行导入 参考:https://www.hangge.com/b 阅读全文
posted @ 2021-06-16 10:10 Shiyu_Huang 阅读(130) 评论(0) 推荐(0) 编辑
摘要:有时候不小心提交了.idea目录,git会一直track这个目录,可以通过一下命令移除: 阅读全文
posted @ 2018-03-20 14:19 Shiyu_Huang 阅读(1740) 评论(0) 推荐(0) 编辑
摘要:1.创建新的ssh key: ssh-keygen -t rsa -C "your_email@email.com" 然后让你输入新的文件名称,这里设置为new # 设置名称为Enter file in which to save the key (/c/Users/Administrator/.s 阅读全文
posted @ 2017-03-18 10:11 Shiyu_Huang 阅读(1483) 评论(0) 推荐(0) 编辑
摘要:下载地址:https://git-scm.com/download/win 打开Git Bash输入 ssh-keygen 打开C:\Users\hsy\.ssh\id_rsa.pub 在某个git仓库目录下:git config user.email "huangsy13@gmail.com" g 阅读全文
posted @ 2016-12-31 13:28 Shiyu_Huang 阅读(176) 评论(0) 推荐(1) 编辑
摘要:1.ssh-keygen 2.cat ~/.ssh/id_rsa.pub 3.git config user.email "huangsy1314@163.com" 4.git config user.name huangsy13 阅读全文
posted @ 2016-10-02 15:33 Shiyu_Huang 阅读(334) 评论(0) 推荐(0) 编辑
摘要:首先推荐一个可视化学习网站:http://pcottle.github.io/learnGitBranching/ 1.初始配置 git config --global user.name "Firstname Lastname" git config --global user.email "yo 阅读全文
posted @ 2015-09-12 13:38 Shiyu_Huang 阅读(330) 评论(0) 推荐(0) 编辑