Git查询

查询分支

git branch # 查询本地分支

git branch -a # 查询所有分支

$ git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master $ git branch
* master

查询仓库

git remote -v # origin为仓库名

$ git remote -v
origin https://anongit.freedesktop.org/git/spice/spice-gtk.git (fetch)
origin https://anongit.freedesktop.org/git/spice/spice-gtk.git (push)

查询提交记录

git log

git log id # 查询某次commit的信息

$ git log
commit 2293b293e83a95a9b939a04a916adf8abed1a100
Author: Takao Fujiwara <tfujiwar@redhat.com>
Date: Fri Apr 15 18:09:37 2016 +0900 Send Hangul key in KR keyboard Korean keyboard assigns Hangul key on the position of Right Alt and
Left Alt and Hangul keys have the different scancodes but MapVirtualKey()
returned the same scancode and could not use Hangul key on Linux desktop. The fix is to send the right scancode of VK_HANGUL. commit 046de27c2eea2b3ee2ade80780f51b2ca140f92d
Author: Takao Fujiwara <tfujiwar@redhat.com>
Date: Fri Apr 15 18:08:37 2016 +0900 Send key release event for some keys in JP keyboard With the previous fix, WM_KEYDOWN of Alt+Zenkaku_Hankaku (VK_KANJI) can
be sent with spice-gtk but Alt+Zenkaku_Hankaku does not send the WM_KEYUP
event in Windows and it caused Linux desktop freeze with unlimited key
press events.

查询文件修改内容

git status #查询当前修改状态

git diff file #在没有执行git add file的情况下查看文件修改内容

git diff id id #比较两次commit之间的差异

git diff --cached #已经执行了git add file但是没有git commit的情况下查看文件修改内容

$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory) modified: src/Makefile.am Untracked files:
(use "git add <file>..." to include in what will be committed) spice-gtk.IAB
spice-gtk.IAD
spice-gtk.IMB
spice-gtk.IMD
spice-gtk.PFI
spice-gtk.PO
spice-gtk.PR
spice-gtk.PRI
spice-gtk.PS
spice-gtk.SearchResults
spice-gtk.WK3 no changes added to commit (use "git add" and/or "git commit -a") $ git diff src/Makefile.am
diff --git a/src/Makefile.am b/src/Makefile.am
index 0ef3bea..44959cf 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -202,6 +202,7 @@ libspice_client_glib_2_0_la_LIBADD = \
$(USBREDIR_LIBS) \
$(GUDEV_LIBS) \
$(PHODAV_LIBS) \
+ $(GTK_LIBS) \
$(NULL) if WITH_POLKIT $ git add src/Makefile.am
$ git diff src/Makefile.am
$ git diff --cached src/Makefile.am
diff --git a/src/Makefile.am b/src/Makefile.am
index 0ef3bea..44959cf 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -202,6 +202,7 @@ libspice_client_glib_2_0_la_LIBADD = \
$(USBREDIR_LIBS) \
$(GUDEV_LIBS) \
$(PHODAV_LIBS) \
+ $(GTK_LIBS) \
$(NULL) if WITH_POLKIT $ git diff 2293b293e83a95a9b939a04a916adf8abed1a100 046de27c2eea2b3ee2ade80780f51b2ca140f92d
diff --git a/src/spice-widget.c b/src/spice-widget.c
index 617cd26..4878e00 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -30,7 +30,6 @@
#endif
#ifdef G_OS_WIN32
#include <windows.h>
-#include <dinput.h>
#include <ime.h>
#include <gdk/gdkwin32.h>
#ifndef MAPVK_VK_TO_VSC /* may be undefined in older mingw-headers */
@@ -1488,14 +1487,6 @@ static gboolean key_event(GtkWidget *widget, GdkEventKey *key)
}
}
break;
- case MAKELANGID(LANG_KOREAN, SUBLANG_KOREAN):
- if (key->hardware_keycode == VK_HANGUL && native_scancode == DIK_LALT) {
- /* Left Alt (VK_MENU) has the scancode DIK_LALT (0x38) but
- * Hangul (VK_HANGUL) has the scancode 0x138
- */
- scancode = native_scancode | 0x100;
- }
- break;

查询commit修改内容

git show

git show $id #显示某次提交的修改内容

$ git show
commit 2293b293e83a95a9b939a04a916adf8abed1a100
Author: Takao Fujiwara <tfujiwar@redhat.com>
Date: Fri Apr 15 18:09:37 2016 +0900 Send Hangul key in KR keyboard Korean keyboard assigns Hangul key on the position of Right Alt and
Left Alt and Hangul keys have the different scancodes but MapVirtualKey()
returned the same scancode and could not use Hangul key on Linux desktop. The fix is to send the right scancode of VK_HANGUL. diff --git a/src/spice-widget.c b/src/spice-widget.c
index 4878e00..617cd26 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -30,6 +30,7 @@
#endif
#ifdef G_OS_WIN32
#include <windows.h>
+#include <dinput.h>
#include <ime.h>
#include <gdk/gdkwin32.h> $ git show 046de27c2eea2b3ee2ade80780f51b2ca140f92d
commit 046de27c2eea2b3ee2ade80780f51b2ca140f92d
Author: Takao Fujiwara <tfujiwar@redhat.com>
Date: Fri Apr 15 18:08:37 2016 +0900 Send key release event for some keys in JP keyboard With the previous fix, WM_KEYDOWN of Alt+Zenkaku_Hankaku (VK_KANJI) can
be sent with spice-gtk but Alt+Zenkaku_Hankaku does not send the WM_KEYUP
event in Windows and it caused Linux desktop freeze with unlimited key
press events. The proposed fix is to send the key release event in spice-gtk. VK_DBE_ALPHANUMERIC, VK_DBE_HIRAGANA, VK_DBE_ROMAN are applied the
similar fixes. diff --git a/src/spice-widget.c b/src/spice-widget.c
index be0d747..4878e00 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -1404,6 +1404,7 @@ static gboolean key_event(GtkWidget *widget, GdkEventKey *key)
#ifdef G_OS_WIN32

查询某个文件的历史修改记录

git log --pretty=oneline filename

[work@bogon spice-common]$ git log --pretty=oneline common/ssl_verify.h
6175014ed77be6d1acd6420e36ca6582b573532c ssl: Don't use uninitialized variable in verify_subject()
c4482c7ff2bf441e6a9e06f30f1b247171bb0738 Use SPICE_{BEGIN,END}_DECLS
3e4b2571a2908ac6a4bd8c48e985ad8d8fd009cb ssl_verify: comment X509_NAME undef
5d02123499ff68f8584384aac7b7a715a3a76a1b mingw: workaround weird openssl build failure
a2e0db03a95de1aab268a41a5496a1c09a7be4e2 common/ssl_verify: special case to WIN32 that isn't MINGW32
4cb26e06f7a5425f84eaafbdc57f7087e184a92d common: fix ssl_verify windows build errors
5de42c768d788c02083cc4455ddc796261419f84 common: add ssl_verify.c common code

Git查询的更多相关文章

  1. Git 查询某次历史提交的修改内容

    在工作时,有时候想查看某次的提交修改了哪些的内容. 我们首先可以git log显示历史的提交列表: 之后我们用git show <commit-hashId> 便可以显示某次提交的修改内容 ...

  2. git 查询某人的提交记录

    git log --author=liubo --name-only

  3. git将本地代码 和服务器git@osc 上的代码 关联

    将本地代码 和服务器git@osc 上的代码 关联 要使用git 首先,你得安装一个git 下载 http://git-scm.com/downloads 安装完成后,需要简单的配置一下,打开 Git ...

  4. git 使用技巧

    让git不检测文件权限 在android根目录执行:repo forall -c git config core.filemode false即可 修改默认编辑器: git config –globa ...

  5. Git 记不住命令

    Git 记不住命令 每次用每次查 真棒 git log --stat --author=someone # git查询某个人修改记录 git log filename # fileName相关的com ...

  6. 在Centos7下搭建Git服务器

    ① 安装 Git ② 服务器端创建 git 用户,用来管理 Git 服务,并为 git 用户设置密码 ③ 服务器端创建 Git 仓库 ④ 客户端 clone 远程仓库 ⑤ 客户端创建 SSH 公钥和私 ...

  7. Jenkins新建项目中源码管理Repository URL使用Git报错:Failed to connect to repository : Command "git ls-remote -h......

    之前部署了Gitlab+Gerrit+Jenkins持续集成环境,但在Jenkins中新建项目的源码管理"Repository URL"中添加git地址环节出现了问题,信息为&qu ...

  8. 关于git远程版本库的一些问题之解决

    Part1:CentOS6.5免密码登录 修改/etc/ssh/sshd_config RSAAuthentication yesPubkeyAuthentication yesAuthorizedK ...

  9. ubuntu查询命令行安装的软件的安装路径

    which git // 查询git的安装路径

随机推荐

  1. Chrome性能分析工具lightHouse用法指南

    本文主要讲如何使用Chrome开发者工具linghtHouse进行页面性能分析. 1.安装插件 非常简单,点击右上角的“添加至Chrome”即可. 2.使用方式 1)打开要测试的页面,点击浏览器右上角 ...

  2. 【题解】[APIO2009]会议中心

    [题解][P3626 APIO2009]会议中心 真的是一道好题!!!刷新了我对倍增浅显的认识. 此题若没有第二份输出一个字典序的方案,就是一道\(sort+\)贪心,但是第二问使得我们要用另外的办法 ...

  3. 我的Android进阶之旅------>报 error: Apostrophe not preceded by \ 的错误解决办法

    今天对项目进行国际化翻译的时候控制台出现了以下的错误: res/values/strings.xml:100: error: Apostrophe not preceded by \ (in Sorr ...

  4. 我的Java开发学习之旅------>工具类:将播放器的进度值转换成相应的时间格式

    在我的博客<我的Java开发学习之旅------>Java 格式化类(java.util.Formatter)基本用法,地址:http://blog.csdn.net/ouyang_pen ...

  5. python基础教程_学习笔记11:魔法方法、属性和迭代器

    版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/signjing/article/details/31417309 魔法方法.属性和迭代器 在pyth ...

  6. SAP 增强表MODSAP 和TFDIR

    2.第二代增强(基于函数模块的增强),用于SMOD和CMOD 维护 在SAP发布的版本中,使用Call customer-function 'xxx'调用函数模块的, 所以你可以通过在程序中搜索 cu ...

  7. 实例化Flask的参数和对app的配置

    Flask 是一个非常灵活且短小精干的web框架 , 那么灵活性从什么地方体现呢? 有一个神奇的东西叫 Flask配置 , 这个东西怎么用呢? 它能给我们带来怎么样的方便呢? 首先展示一下: from ...

  8. linux 加密解密文件小程序

    代码见下面,编译之后就可以用:建议放在bash下,或者添加环境变量. 使用方法:encrypt .两次输入密码.加密密码与解密密码不一致解码后就不是原文件了! #include <stdio.h ...

  9. Windows下使用vim编写代码,使用nmake编译代码,使用vs来调试代码

    1.编写代码 2.编写Makefile,如果要调试, 2.1.需要在编译的时候加上/Zi ( Generates complete debugging information),编译由cl.exe来完 ...

  10. (Nginx + Gunicorn) 时 nginx 400 request line is too large (4360 4094)

    查看nginx下面两个参数 值是否满足 client_header_buffer_size 512k;large_client_header_buffers 4 512k; 满足依然出现 如果ngin ...