- 博客(10)
- 收藏
- 关注
原创 Git与远程仓库关联以及关联错误解决方法
假设你github的用户名是 helloworld ,你在上面创建了一个 名为 hello 的 repository.一. 与本地仓库进行关联1.1用原生ssh进行关联,速度快:git remote add origin git@github.com/helloworld/hello.git1.2用https进行关联,速度相对ssh慢点:git remote add o...
2018-11-25 12:34:52 2149
原创 Git 删除文件
以 hello.txt 文件为例1.在本地和仓库把文件都删除:rm hello.txtgit rm hello.txt 或者 git add hello.txt2.在本地把文件删除了,但是想恢复过来:git checkout -- hello.txt ...
2018-11-25 10:18:51 124
原创 Git 撤销修改
以 hello.txt 为例情况一:没有添加到暂存区的撤销方法:用 以下命令即可撤销完成:git checkout -- hello.txt情况二:添加到暂存区后的撤销方法:1.1 先取消暂存git reset HEAD hello.txt1.2然后撤销修改,用命令git checkout -- hello.txt撤销完成。情况三:同步到了...
2018-11-25 10:14:15 116
原创 git版本回退
1.显示修改记录:git log显示的有点乱,不要紧,我们可以一行一行的显示,只需要将命令修改为:git log --pretty=oneline2.回到上一次修改的版本:git reset --hard HEAD^如果想往上n个版本,就是当前到 当前版本 加 n 的那个版本,用git reset --hard HEAD~n3. 想回到某个版本,可以用...
2018-11-25 09:07:23 83
原创 Git 新建文件并提交
1.创建一个readme.txt.cd /home/cyp/learngittouch readme.txtvim readme.txt编写内容, wq 保存推出2.提交步骤2.1 git add readme.txt 提交到暂存2.2 git commit -m "写上你做的改动” 提交到仓库.3.git status 查看状态4. git diff 查...
2018-11-25 08:30:08 1197
原创 Git版本库的创建(Ubuntu)
在Ubuntu上学习Git随笔。一. git 仓库的安装git在终端用git命令查看Ubuntu是否安装git版本库,如果没有安装,最新版本(Ubuntu18.04)会提示用下面命令进行安装。sudo apt install git如果老版本用下面几个命令试一下sudo apt-get install gitsudo apt-get install git-cor...
2018-11-25 08:22:58 202
原创 电脑屏幕随着显示内容的亮暗而导致屏幕亮暗变化的原因及解决方法
这种情况我搜了下,问题可能都集中在小米笔记本上,当然其他的笔记本也有这样的问题。但是,这个问题不是小米的锅也不是集显的锅,而是Windows的锅。原因及解决方法:1. Win + R 输入 services.msc 2.找到 Sensor Monitoring Service ,原因它已经说的很明显了。3. 双击 Sensor Monitoring Ser...
2018-11-24 13:45:45 16908 5
原创 Ubuntu命令行运行C程序和C++程序
首先Ctrl + T 打开一个终端,cd到你建立C/C++文件的目录下。下面以建立 helloc.c 和 hellocpp.cpp 进行演示vim helloc.c按 i 进入插入操作,然后写C代码:#include<stdio.h>int main(){ printf("hello,world!\n"); return 0;}按 Ct...
2018-11-20 09:33:38 8903
原创 POJ 1915 Knight Moves
Knight Moves//Knight Moves : http://poj.org/problem?id=1915#include<iostream>#include<cstring>#include<queue>using namespace std;int l,sx,sy,ex,ey;bool mark[305][305];int ...
2018-11-04 15:36:10 107
原创 Catch That Cow[POJ 3278]
Catch That Cow//Catch That Cow : http://poj.org/problem?id=3278#include<iostream>#include<queue>#include<cstring>using namespace std;int n,m;bool vis[200100];struct node...
2018-11-04 14:40:54 120
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人