
git
42nf
十年之后,,又是另一番景象
展开
-
unable to read askpass response from...not read Username for ‘https://github.com: Device not
1.原仓库地址:https://github.com/mywork/my.project.git2.修改后 仓库地址:https://用户名:密码@github.com/mywork/my.project.git原创 2022-02-28 14:51:20 · 1083 阅读 · 0 评论 -
Git 首次关联远程仓库(代码有冲突解决)
1.本地项目 初始化 gitgit init2.添加本地代码到暂存区git add .3.提交本地代码(先保存本地的代码,防止后面合并冲突)git commit -m '保存本地版本'4.添加 远程仓库地址git remote add origin http://xxx.xxx.git5.拉取远程仓库代码,忽略提交历史记录git pull --allow-unrelated-histories6.有冲突的情况如下:CONFLICT (add/add).原创 2021-11-04 11:44:12 · 771 阅读 · 0 评论 -
android studio git 回滚某个commitId,并强制提交(注意:会把这个commitId之后的提交删除)
切换到 Terminal:1. git reset commitId //想要回到的 commitId2.git push --force // 强制推送,想要回到的 commitId 之后的 所有提交 都将被删除原创 2020-12-23 20:21:37 · 1386 阅读 · 0 评论 -
git撤销 某个commit,并删除远程 某个commit 之后的所有提交
注意:此方法会把想要回到的 commitId 之后的 所有提交 都删除掉(慎用)git reset commitId //想要回到的 commitIdgit stash //保存未提交的修改git push --force // 强制推送,想要回到的 commitId 之后的 所有提交 都将被删除git stash pop //未提交的修改 回归到文件...原创 2020-10-28 23:12:16 · 1530 阅读 · 0 评论 -
github clone 慢问题解决
git clone https://github.com/MyName/myjava.git替换为git clone https://github.com.cnpmjs.org/MyName/myjava.git也就是 github.com 替换为github.com.cnpmjs.org原创 2020-05-18 22:40:10 · 209 阅读 · 0 评论 -
git 设置代理
// 查看当前代理设置 ,注意:必须有代理服务器git config --global http.proxy// 设置当前代理为 http://127.0.0.1:1080 或 socket5://127.0.0.1:1080git config --global http.proxy'http://127.0.0.1:1080'git config --global ht...原创 2019-01-06 18:08:01 · 20072 阅读 · 8 评论 -
github private 私有仓 提交
1.git pullhttps://(GitHub用户名,不是邮箱): 你的密码@github.com/myy/exmple.git2.git add .3.git commit -m '首次提交'4.git push https://(GitHub用户名,不是邮箱): 你的密码@github.com/myy/exmple.git...原创 2019-03-02 18:39:24 · 5766 阅读 · 0 评论