git撤销操作,添加代理以及wget设置代理
git撤销操作
没有add
bash
1 | git status |
没有commit
bash
1 | git status |
没有push
bash
1 | git log # 得到你需要回退一次提交的commit id |
已经push,希望回滚到上一个版本
- 通过git reset直接删除指定的commit
bash
1 | git log # 得到你需要回退一次提交的commit id |
- 通过git revert是用一次新的commit来回滚之前的commit
bash
1 | git log # 得到你需要回退一次提交的commit id |
git revert是用一次新的commit来回滚之前的commit,此次提交之前的commit都会被保留;
git reset是回到某次提交,提交及之前的commit都会被保留,但是此commit id之后的修改都会被删除。
git添加代理
参考git config文档,查找http.proxy
和remote.<name>.proxy
设置。
bash
1 | git config -l # 显示配置 |
wget设置代理
添加变量即可
bash
1 | export HTTP_PROXY=127.0.0.1:8889 |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Venusleeyous!
评论
Powered By Valine
v1.5.2
v1.5.2