I don’t know why Jason Lattimer’s D365DeveloperExensions no more working after VS 2017 release? It seems D365DeveloperExtensions anymore supported for newer Visual Studio version. I am pretty much sure, some of you may be still struggling with installing Dynamics 355 Developer extension for your Visual Studio 2017 community or professional edition. Not sure why this tool has been
Read more
Tag: Git
Tutorials and howtos on git configuration and usage.
How to list all commits in a git repository
Posted on`git log` only list all the commits in the current working branch. For some cases, we may want to list all the commits in a git repository. The `git log` command does not do this. But there are other supports in `git` that can do so. The command to list all commits is git rev-list
Read more
How to rename a branch name in the remote git server?
Posted onHow to rename a branch name in the remote git server? For example, I made a mistake to push a branch named ood-name to the git server while I intended to name it old-name. How to rename the branch name ood-name on the remote git server? You may change the remote git server’s branch name
Read more
How to produce a patch file for a specific git commit?
Posted onHow to produce a patch file for a specific git commit so that the changes in that commit can be emailed/sent? git show 550a38b52 generate a quite close content while it is not exactly a patch. You can use this command git format-patch -1 550a38b52 It will generate a file like 0001-<commit-title>.patch in the current
Read more
How to clean the commit history of a repository?
Posted onHow to clean the commit history of a repository in both of my locally cloned copy and the copy on the git server so that only the files after the last commit are left? git works in branches. Here, we assume removing the history of the master branch. One solution is doing as follows. Rename
Read more
How to unignore some files or dirs in git?
Posted onI set up rules to ignore all files under git by adding a .gitignore like * But how to unignore some files or dirs in git? For example unignore all files under ./bin/tool1/ under the git repository. You can use patterns with ! as the prefix to “unignore” files. From gitignore man page: An optional prefix “!”
Read more
How to upgrade vim to version 8 on CentOS 7?
Posted onvim on CentOS 7 is version 7.4 with patches 1-160: $ vim –version VIM – Vi IMproved 7.4 (2013 Aug 10, compiled Dec 21 2016 17:00:20) Included patches: 1-160 How to upgrade it to version 8 which is the latest major version? Update on Oct 23 2018: the repository introduced in the original method is
Read more
How to choose the key used by SSH for a specific host?
Posted onHow to choose a key used rather than the default ~/.ssh/id_rsa when ssh to a remote server for a specific host? You have at least 2 choices for choosing the key used by ssh. Taking ~/.ssh/key1 and user@example.com as the example here. Method one, specify the key in command line with the -i option of
Read more
How to config Git remote server on Bitbucket or Github
Posted onFor your first push with git, you may get following errors when you use github or bitbucket. $ git push No refs in common and none specified; doing nothing. Perhaps you should specify a branch such as ‘master’. fatal: The remote end hung up unexpectedly Everything up-to-date Just run following command to set your remote
Read more
How to get the top committers in git?
Posted onHow to get the top committers in git? Like in github: But plain text is fine showing number of commits and author names/emails sorted by the number of commits. You may use this command: git log | grep Author | sort | uniq -c | sort -n -r Here, count the number of commits by
Read more
How to get the latest git commit SHA-1 in a repository?
Posted onHow to get the latest git commit SHA-1 id in a repository? And how to get the first 8 digits of the SHA-1? Instead of the method introduced here, you may use $ git rev-parse HEAD to get the commit SHA-1 hash ID. If you want to get the first 8 digits only, use $
Read more
How to keep master thesis safety and availability on Windows
Posted onWhen you write your master thesis (in Chinese) on windows, you may have following worries. a, Be afraid your master thesis is lost (or can not be accessed) when hard disk/udisk is broken (or something other viruses). b, Keep master thesis availability (7×24) and safety. c, Do not want anyone else to access it before
Read more
How to do diff like `git diff –word-diff` without git on Linux?
Posted onThe result of git by git diff –word-diff is great. But how to do diff like git diff –word-diff without git on Linux? The plain diff command on Linux seems not accept options like –word-diff. The wdiff is for word-diff: wdiff program is a front end to diff for comparing files on a word per
Read more
Git push error under CENTOS 6.7
Posted on$ git add file $ git commit -m “xxxx” $ git push error: The requested URL returned error: 403 Forbidden while accessing https://github.com fatal: HTTP request failed Change your ~/.gitconfig as follows: $ cat ~/.gitconfig [user] name = xxx email = xxx@gmail.com [remote “origin”] fetch = +refs/heads/*:refs/remotes/origin/* url= https://name@github.com/name/xxx.git
How to test whether the git repository is dirty?
Posted onHow to test whether the git repository is dirty? git status can show this. But how to diagrammatically detect this in bash? This piece of bash code works like a charm for me: [[ $(git diff –shortstat 2> /dev/null | tail -n1) != “” ]] You can use it to build your script. For example,
Read more
How to get the latest commit’s hash in git?
Posted onI am looking for a better method for getting the latest commit’s hash in git. I know git log -1 can show the info of the latest commit and from the info of the latest commit I can use grep and other tools to get the hash. Is there better method supported from git? Note:
Read more
git push error
Posted on$ git push error: The requested URL returned error: 403 Forbidden while accessing https://github.com/HarryWei/hummer.git/info/refs fatal: HTTP request failed Replace (or add) url=ssh://git@github.com/HarryWei/hummer.git with url=https://git@github.com/HarryWei/hummer.git under “[remote “origin”]” section in ~/.gitconfig file. Reference:http://stackoverflow.com/questions/7438313/pushing-to-git-returning-error-code-403-fatal-http-request-failed
git: how to merge upstream with fork repo
Posted onHow to merge upstream into local fork repo with git? Merging an upstream repository into your fork: https://help.github.com/articles/merging-an-upstream-repository-into-your-fork/ Merging an upstream repository into your fork: https://help.github.com/articles/merging-an-upstream-repository-into-your-fork/
What about the master branch for local git configuration in a git repository to make it track remote master branch?
Posted onWhat about the master branch for local git configuration in a git repository to make it track remote master branch? You may append these lines to .git/config in your cloned repository directory: [branch “master”] remote = origin merge = refs/heads/master
How to merge git branches quickly and correctly
Posted onSuppose I have following branches harryxiyou@common_vm ~/forest/sqle/sqle/scripts $ git branch * dev-harry master rc After I did some changes on dev-harry branch, I wanted to merge dev-harry into rc branch. 1, git checkout rc 2, git merge dev-harry References:http://stackoverflow.com/questions/24147169/merge-two-remote-branches-in-githttps://www.atlassian.com/git/tutorials/using-brancheshttp://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging I usually add –no-ff during git merge to force git to add a commit for the
Read more