跳至主要内容

博文

目前显示的是标签为“git”的博文

Use MobaDiff with git difftool

Recently there's an activity in IT that forces the deletion of all unauthorized softwares from all work machines. Unfortunately, kdiff3 is one in the list. As it is generally okay to use vimdiff as an alternative for kdiff3, A gui tool is better suited for desktop workflows. Known that MobaXterm is shipping a gui diff tool named MobaDiff. But it only appears in the windows right click context menu. Find the real application name takes me some time to search in the windows registry. "MobaRTE.exe", which is the one invoked by HKCR\*\shell\MobaDiff. And it was invoked with "-contextdiff" switch to show MobaDiff UI, while when the switch is "-contextedit" it shows MobaTextEditor. Too bad that the "-contextdiff" switch do not support pre-image post-image as other diff tool did, which effectively made it unable to be used as a command line diff utility. Also MobaTech did not mention anything in their document of this Mob...

bfg is not always perfect

When something broken in your git lfs workflow It is awful when this happened in your packaging procedure. Image that, everything should have been a binary archive being end in a text point file in your installation media.. Nightmare.. So how could it happen? All begins with a repo optimization.. You have a repo full of binary files, and you want it to be clean and neat. You know that bfg will help you on the job. And did the convention with some magic file pattern like *.{jpg,png,zip,gz,tar} Then you replaced the repo, without any sanity test. Git lfs pointer files begins to show up in your source tree You got this after every git operation, as the git hooks did not work as expected. They don’t understand bfg generated filter rules in your .gitattribute file. Git lfs files shows as modfied after git lfs pull You know that git lfs pull can help you with pointer file => binary convertion. But it do not help much, as everything converted...

learning some sbt fu by build the bfg tool excerpt: sbt 1 2 3

I want to build the bfg tool In my previous blog I talked about bfg the bfg-repo-cleaner . It is a fast repo maintain tool written in scala. The developer didn't provide any prebuilt binary downloads. So, clone and built by myself. SBT do not work well the maven way After some simple git clone. Backed with some maven knowledge and knowing that sbt is kind of same tool. I thought like a fool that a sdk install sbt followed by sbt build command will built a beautiful jar in target directory as maven package do. Sbt version mismatch Quickly, I learn the first lesson from sbt: sbt will not build the old project with latest sbt version, it will always try to build the project with declared version. If the version is not available locally, SBT will try to download it until successes with the downloading. sbt will download with project declared sbt version if not already installed. sbt will download the project declared scala version if not already installed. s...

What is git-lfs and how to convert existing repo

What is git-lfs According to its name, git-lfs is git-large-file-storage. Is a git plugin which replace large file to their corresponding text pointers in git repo. This way it accelerates git fetch process by only download needed large file objects. Why git-lfs? Git service provider such as GitHub and bitbucket are both activated the git-lfs on their service. Actually, github also setup a hook that will reject commits with large binary files. If you have a legacy git repository and want to host it on GitHub, you must make sure there's no large binary files ever checked into your repo in the past. What if you got a poisoned repo full of large binary files? There are no many options to choose from when you are in this situation. Convert or migrate to git-lfs repo. Drop the history, as huge git-lfs do cost money. Both github and bitbucket set 1GB limit on their free git-lfs storage capacity. Enable git-lfs in new repo and Convert existing repo to git-...