git
文章平均质量分 57
qianxuedegushi
这个作者很懒,什么都没留下…
展开
-
使用repo命令统一回退项目中各git版本库到指定日期
原文链接:https://blog.csdn.net/Qidi_Huang/article/details/65443351执行下面这样的repo命令就行了:repo forall -c 'commitID=`git log --before "2017-03-17 07:00" -1 --pretty=format:"%H"`; git reset --hard $commitID'参数说明:forall 操作分支中的所有仓库-c 只操作当前分支--before 早于指定时间点的提交记转载 2021-08-20 15:38:10 · 3277 阅读 · 1 评论 -
git 查看某个文件某个函数具体修改时间及内容
git blame kernel/sched/core.c | grep try_to_wake_up原创 2021-06-30 14:11:35 · 1358 阅读 · 0 评论 -
git 分支操作管理
查看所有分支:ator@atorpc:~/workspace/soft/git_org_kernel/linux-stable$ git branch -a* (HEAD detached at v4.19.82) master remotes/origin/HEAD -> origin/master remotes/origin/linux-2.6.11.y remotes/origin/linux-2.6.12.y remotes/origin/linux-2.6.13....原创 2021-06-17 17:31:36 · 432 阅读 · 1 评论 -
repo init 下载代码error.GitError: manifests ls-remote: usage: git ls-remote
ator@atorpc:~/workspace/soft/alphard20$ repo init -u ssh://ator.liang@IP/INP-Alphard-022.1/manifest -m default.xmlDownloading Repo source from https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/remote: Counting objects: 6393, done.remote: Compressing obj原创 2021-04-26 17:48:16 · 1928 阅读 · 0 评论 -
执行repo init提示error.GitError: manifests ls-remote解决方案
1)首次执行repo init 命令提示如下(粗体提示):atorliang@atorliang-HP-ProDesk-680-G4-MT:~/workspace/soft/cv25$ repo init -u ssh://ator.liang@IP/INP-Alphard-022.1/manifest -m default.xmlDownloading Repo source from https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/remote原创 2021-04-22 15:41:52 · 5361 阅读 · 0 评论 -
如何用git命令生成Patch和打Patch
转自:https://www.cnblogs.com/ArsenalfanInECNU/p/8931377.html在程序员的日常开发与合作过程中,对于code的生成patch和打patch(应用patch)成为经常需要做的事情。什么是patch?简单来讲,patch中存储的是你对代码的修改 什么是生成patch?生成patch就是记录你对代码的修改并将其保存在patch文件中 什么是打patch?打patch就是将patch文件中对代码的修改,应用到源代码,从而把对代码的修改应用到code中。转载 2020-12-03 10:11:52 · 1708 阅读 · 0 评论 -
git-branch,git-checkout和repo-start三条命令的差异比较
compare Difference among git-branch, git-checkout and repo-start1. $ repo startused to begin a new topic branch, starting from the revision specified in the manifest.xml file. All new branches are parallel and the original branch is the same base of.转载 2020-11-20 13:35:48 · 1096 阅读 · 0 评论 -
git pull 问题
git pull 无法获取远程分支, 与远程handshakes失败,提示如下:ator@ator-hp-prodesk-680-g4-mt:~/workspace/tracker/.repo/repo$ git pullfatal: unable to access 'https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/': gnutls_handshake() failed: The TLS connection was non-properly t原创 2020-08-26 14:02:54 · 469 阅读 · 0 评论 -
Git commit (amend)
原文链接: https://www.cnblogs.com/qianqiannian/p/6005628.html https://www.jianshu.com/p/a8a2ac58f37d https://www.jianshu.com/p/c9db76c2936e------------------------------------------...原创 2019-12-17 13:56:16 · 1563 阅读 · 0 评论 -
Git 查看提交历史
在使用 Git 提交了若干更新之后,又或者克隆了某个项目,想回顾下提交历史,我们可以使用 git log 命令查看。针对我们前一章节的操作,使用 git log 命令列出历史提交记录如下:$ git logcommit d5e9fc2c811e0ca2b2d28506ef7dc14171a207d9 (HEAD -> master)Merge: c68142b 7...转载 2019-12-05 08:52:12 · 992 阅读 · 0 评论 -
git 基本操作
获取与创建项目命令git init用 git init 在目录中创建新的 Git 仓库。 你可以在任何时候、任何目录中这么做,完全是本地化的。在目录中执行 git init,就可以创建一个 Git 仓库了。比如我们创建 runoob 项目:$ mkdir runoob$ cd runoob/$ git initInitialized empty Git repository...转载 2019-12-04 18:28:41 · 181 阅读 · 0 评论 -
git忽略某个目录或文件不上传
在使用Git的过程中,我们喜欢有的文件比如日志,临时文件,编译的中间文件等不要提交到代码仓库,这时就要设置相应的忽略规则,来忽略这些文件的提交。Git 忽略文件提交的方法有三种方法可以实现忽略Git中不想提交的文件。在Git项目中定义 .gitignore 文件这种方式通过在项目的某个文件夹下定义 .gitignore 文件,在该文件中定义相应的忽略规则,来管理当前文件夹下的文件的...转载 2019-09-28 16:13:01 · 5225 阅读 · 0 评论 -
正则表达式
声明: 本文转自朱双印的个人日志博客,只为学习使用。欢迎访问原文。...转载 2019-09-21 17:30:03 · 95 阅读 · 0 评论 -
grep命令
转载声明: 本文转自朱双印的个人日志博客。转载至此只为学习用。欢迎访问原文。(正则表达式文章链接:http://www.zsythink.net/archives/tag/%e6%ad%a3%e5%88%99%e8%a1%a8%e8%be%be%e5%bc%8f/)...转载 2019-09-20 17:48:23 · 70 阅读 · 0 评论 -
Git push 常见用法
Git push 在使用git commit命令将修改从暂存区提交到本地版本库后,只剩下最后一步将本地版本库的分支推送到远程服务器上对应的分支了,如果不清楚版本库的构成,可以查看我的另一篇,git 仓库的基本结构。 git push的一般形式为 git push <远程主机名> <本地分支名> <远程分支名> ,例如 git pus...转载 2018-05-14 16:52:31 · 307 阅读 · 0 评论 -
Git commit 常见用法
Git commit git commit 主要是将暂存区里的改动给提交到本地的版本库。每次使用git commit 命令我们都会在本地版本库生成一个40位的哈希值,这个哈希值也叫commit-id, commit-id在版本回退的时候是非常有用的,它相当于一个快照,可以在未来的任何时候通过与git reset的组合命令回到这里. 1.1 git commit -m “...转载 2018-05-14 16:27:30 · 117181 阅读 · 1 评论 -
git工作区、暂存区、版本库之间的关系
区分三者关系 Git最让你迷惑的无非是它里面的各种概念了,如果是刚开始接触Git希望看完本篇介绍之后有一个清晰的认识,笔者认识也有限这里只说说个人对使用Git的感受,说一下它里面的几个最常用的概念的理解。 在初始化git版本库之后会生成一个隐藏的文件 .git ,可以将该文件理解为git的版本库 repository,而我们自己建立的项目文件夹即工作区 working d...转载 2018-05-14 15:39:39 · 347 阅读 · 0 评论