快速開啟目錄下檔案
- command mode 打 ctrl+p
- 找檔名
- 選檔案, ctrl+t 開在新分頁; ctrl+v 開在目前分頁的新 window, ctrl+x 水平切,按 enter 開在目前分頁
- ctrl+g 離開
$ git push origin [name_of_your_remote]
刪除遠端 branch:git push origin :your_branch刪除本地branch:git branch -d yourbranch
update remote branch: http://blog.csdn.net/u012150179/article/details/171722112 ,从远程获取最新版本到本地
1 2 3 4 | $ git fetch origin master
From https://github.com/com360/android-app
* branch master -> FETCH_HEAD
su@SUCHANGLI /e/eoe_client/android-app (master)
|
1 2 | $ git log -p master.. origin/master
su@SUCHANGLI /e/eoe_client/android-app (master)
|
1 2 3 | $ git merge origin/master
Already up-to-date.
su@SUCHANGLI /e/eoe_client/android-app (master)
|
加patch: 今天要打包最新的三個 commit 的話 git format-patch -3 此時 git 便會幫你產生3個類似下列的檔案 0001-First.patch 0002-Second.patch 0003-Third.patch 2.那如果要套用別人的patch 也相當簡單 git am 0001-First.patch 就將 patch apply 上去了
================================
刪除錯誤提交commit:
方法:
git reset --hard
git push origin HEAD --force
Git patch 合併有衝突的話:
http://www.fwolf.com/blog/post/448
#include <stdio.h>
#include <stdlib.h>
#define swap(x,y) (x^=y,y^=x,x^=y)
int main()
{
unsigned long A, B;
while(scanf("%ld %ld", &A, &B) == 2)
{
printf("%ld %ld ", A, B);
if (A > B) swap(A,B);
unsigned long max = 0;
unsigned long i;
for(i = A; i <= B; i++)
{
unsigned long count, n;
for(count = 0, n = i;;)
{
count++;
if(n == 1) break;
n = (n%2==1)? 3*n+1 : n >> 1;
}
if(count >= max) max = count;
}
printf("%ld\n", max);
}
return 0;
}
ubuntu 14.04:
apt-get install cmake flex libpciaccess-dev bison libx11-dev libxext-dev libxml2-dev libvdpau-dev
apt-get install build-essential -y
apt-get install doxygen