随笔分类 - Git
摘要:git remote add upstream xxxxx 其中upstream可以修改为任何你觉得可以的名字
阅读全文
摘要:git stash git checkout -b new_branch git stash pop git add -A git commit -m "comments" git push
阅读全文
摘要:1. git log找到需要回撤的commit_hash 2. 执行git reset --soft commit_hash (这样的话,不会删除最新的代码。如果完全回退到以前版本,可以使用--hard替换--soft) 3. 修改代码,或者删除代码 4.git add -A; git commit
阅读全文
摘要:git checkout -b 本地分支名 origin/远程分支名
阅读全文
摘要:1.clone最近一次提交 git clone --depth=1
阅读全文
摘要:1.公开仓库可以采取替换网址: https://www.zhihu.com/question/27159393 将原本的网站中的http://github.com 进行替换为github.com.cnpmjs.org 2.通过gitee进行导入 参考:https://www.hangge.com/b
阅读全文
摘要:有时候不小心提交了.idea目录,git会一直track这个目录,可以通过一下命令移除:
阅读全文
摘要: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
阅读全文
摘要:下载地址: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
阅读全文
摘要:1.ssh-keygen 2.cat ~/.ssh/id_rsa.pub 3.git config user.email "huangsy1314@163.com" 4.git config user.name huangsy13
阅读全文
摘要:首先推荐一个可视化学习网站:http://pcottle.github.io/learnGitBranching/ 1.初始配置 git config --global user.name "Firstname Lastname" git config --global user.email "yo
阅读全文