
Git
小白笑苍
沉默是一种生活方式。
展开
-
Some basic tips about 'git stash'
the command ‘git stash’ is to save the modification in workspace and staged status in the stack. The basic command is:##save the modification to the stackgit stashIf you want to add some comments:git原创 2017-11-21 10:08:32 · 288 阅读 · 0 评论 -
How to find the log I want when using 'git log'
Usually we use the * git log* without any parameters,just like:git log##or make the number of the log that need to be showgit log -3But sometimes I just want to search some specific logs I want.So ho原创 2017-11-16 10:29:29 · 189 阅读 · 0 评论 -
简单对比git pull和git pull --rebase的使用-(转)
使用下面的关系区别这两个操作:git pull = git fetch + git mergegit pull –rebase = git fetch + git rebase现在来看看git merge和git rebase的区别。假设有3次提交A,B,C。在远程分支origin的基础上创建一个名为”mywork”的分支并提交了,同时有其他人在”origin”上做了一些修改并提交了。转载 2018-01-11 15:14:04 · 7130 阅读 · 1 评论 -
git merge 和 git rebase 小结-(转)
git merge是用来合并两个分支的。git merge b # 将b分支合并到当前分支同样 git rebase b,也是把 b分支合并到当前分支———————————–他们的 原理 如下:假设你现在基于远程分支”origin”,创建一个叫”mywork”的分支。$ git checkout -b mywork origin假设远程分支”ori转载 2018-01-16 14:46:40 · 251 阅读 · 0 评论 -
Git Principle Summary
Git Principle SummaryGit is a content-addressable file system. The core is a key-value data store. You can insert anything and it will return a 40 length hash number by the SHA-1 algorithm.1.The...原创 2018-05-14 16:36:56 · 461 阅读 · 0 评论 -
windows/Linux下使用github流程
开源相关开放源代码(Open source code)也称为源代码公开,指的是一种软件发布模式。GithubGitHub是一个利用Git进行版本控制、专门用于存放软件代码与内容的共享虚拟主机服务。 windows下的准备工作: - windows环境下安装github for windows - 注册github账号 - 登录 github for windows - 下...原创 2018-08-21 17:14:33 · 616 阅读 · 0 评论 -
Fix problem '[WARN] Failed to authenticate with your SSH keys. Proceeding as anonymous'
Today I meet a problem when I want to compile the code:[WARN] Failed to authenticate with your SSH keys. Proceeding as anonymousThen I try to fix this problem.The progress is below:it is a SSH pu...原创 2018-10-08 14:38:53 · 761 阅读 · 0 评论 -
Windows10和Visual Studio Code环境中配置使用Git和GitHub
备注:开始使用Visual Studio Code以来,系统每天提示“Git”有关的信息,因为觉得好奇就开始在网上了解、查资料、配置、测试,反正就是反复折腾,N次都失败了,就在打算放弃的时候,在N+1次,也就是刚才(2018年1月19日 14:25)终于成功了,赶紧写下来,梳理梳理,表示记念。另外,希望可以帮助到其他更多...转载 2019-02-20 22:27:48 · 1826 阅读 · 0 评论 -
How to revert the code/files that have been merged to the remote Repo
I pushed the wrong code to the remote Repo and just want to back out the merge.The common way is to use git revertgit revert [the commit you want to back out]But sometimes I just want to back out sever原创 2017-11-15 14:41:35 · 245 阅读 · 0 评论 -
How to merge/cover specific file using git
Some times I just want to merge several specific files and want to check the merge result in real time,you can use:git checkout --patch [the branch name/the commit id] [the file path]Then the shell wil原创 2017-11-15 11:24:53 · 195 阅读 · 0 评论 -
How to Ignore new commits for git submodule
the git occured serveral new commits like:Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working di原创 2017-08-25 10:41:32 · 1292 阅读 · 1 评论 -
git撤销本地所有修改(新增、删除、修改)
git checkout . #本地所有修改的。没有的提交的,都返回到原来的状态git stash #把所有没有提交的修改暂存到stash里面。可用git stash pop回复。git reset --hard HASH #返回到某个节点,不保留修改。git reset --soft HASH #返回到某个节点。保留修改git clean -df #返回到某个节点git clean 参数原创 2017-08-22 10:30:09 · 17720 阅读 · 1 评论 -
git push failed Because the Fault of insufficient permission for adding an object
Here is the fault print:Counting objects: 3, done.Writing objects: 100% (3/3), 214 bytes | 0 bytes/s, done.Total 3 (delta 0), reused 0 (delta 0)remote: error: insufficient permission for adding an o原创 2017-08-23 00:32:15 · 390 阅读 · 0 评论 -
How to Install Git Server in the PI
install the git software:sudo apt-get install wget git-coreif you don’t have ssh,install it:sudo apt-get install sshstart ssh:sudo /etc/init.d/ssh startset default start:sudo update-rc.d ssh defaultsad原创 2017-08-23 00:57:36 · 358 阅读 · 0 评论 -
How to roll back/cherry-pick a specific file to a node you want?
roll back a specific file to the node I want:git checkout <the commit id> <file path>merge the specific file I want to the current branch:git checkout --patch <the branch name> <the file path>原创 2017-10-19 09:53:05 · 220 阅读 · 0 评论 -
How to compare the differences of the same file in the two nodes
Sometimes I want to know the differences of the same file in the two nodes but don’t know the command needed.So I search the answer and finally find it:git diff <commit id 1> <commit id 2> -- <the file原创 2017-10-19 15:30:59 · 266 阅读 · 0 评论 -
Some basic git commands that you will use usually
GIT OPERATION SUMMARYHere are some tips/questions about the git operation that maybe we will meet in daily work. The structure of the git and the basic commandsHow to use the git aliases in shellExecu原创 2017-10-27 16:32:51 · 495 阅读 · 0 评论 -
How to delete the remote branch in git
You can see the remote branch with this:git branch -r git branch -r | grep <your key word>see the local and remote branch:git branch -r git branch -r | grep <your key word>delete the remote branc原创 2017-10-12 16:28:55 · 1099 阅读 · 0 评论 -
Some frequent operation of the git
delete the modification of the workspace:git checkout -- <filename>hard roll back the code version,it will not store your modification:git reset --hard <commit id>soft roll back the code and will t原创 2017-10-12 16:39:09 · 332 阅读 · 0 评论 -
the unpack error when I push my modification to the Gerrit
questionI want to push my code modification to the Gerrit for a code view but it failed because of the unpack error.How to fix itpush with –no-thin:git push --no-thin omnigerrit HEAD:refs/for/android原创 2017-10-12 16:46:37 · 315 阅读 · 0 评论 -
Something about the git cherry-pick
the function of the git cherry-pick is to merge another local branch’s modification to your current branch:git cherry-pick <commit id>if you meet some conflicts,you can use:git mergetool原创 2017-10-12 16:51:06 · 206 阅读 · 0 评论 -
What's the difference between update and upgrade
UPDATE: update is used to download package information from all configured sources. UPGRADE: upgrade is used to install available upgrades of all packages currently installed on the system from the s原创 2017-10-16 14:53:15 · 332 阅读 · 0 评论 -
How to fix the problem of executing gitenv.csh file failed
How to fix the problem of executing “gitenv.csh” file failedThe ProblemToday when I checkout from one branch to another branch,I can’t use the command of ‘rsarte_rac_oam’.I guess there has someting wro原创 2017-07-26 16:54:58 · 603 阅读 · 0 评论