I promised myself I’d be honest, brutally honest, about all the things I’ve had to learn. And one of them is about the capitalized letter when you’re presented with such a question in a command line interface.
I’ll admit I was typing in ‘Y’ as a response. Perhaps it wants me to be really sure. Kinda like when you want to get hot water out of a water cooler, you have to press 2 buttons or hold one button down, etc.
The capitalized letter is the default if you were to simply press enter.
For example, if you want to open VS as your external diff tool, as you saw in yesterday’s tip
$ git difftool branch-name file-name
You can simply press enter, and the vsdiffmerge command will be run!
GitHub has a built-in 3D file viewer that allows you to get a 360 degree view of your 3D models. This 3D file viewer also gives you an interactive diff experience to compare changes between commits!
I created a quick cube using Microsoft’s 3D Builder. I added it to my repo and pushed it up to GitHub.
There are 3 options for viewing the 3D model.
And the grand finale, how to view a diff of a 3D Model.
Using the 3D Builder software, I added a cone to the top of the cube. I pushed these changes up to GitHub.
If you look at the diff of the commit (click the commit ID circled in red above), you’ll see the diff viewer. By default it shows you what’s changed. Since I added a cone, the cone is shown in green (for additive).
At the bottom of the image, you’ll find the Revision Slider. Click this link for an interactive 3D diff experience!
In the image below, you’ll see how the cone is added.
GitHub offers 3 ways for you to diff your images. For example, this commit diff shows how I checked in an image and then changed the image completely in the next commit.
At the bottom of the image, you’ll see the options for 2-up, Swipe, and Onion Skin.
The default view is the 2-up, which shows the images before and after side-by-side.
Swipe allows you to do more of a pixel-by-pixel comparison by allowing you to slide a splitter back and forth over the image.
Onion skin allows you to pick up on subtle changes you might have otherwise missed. Although there’s nothing subtle with the image I picked
Today’s tip of the day images are brought to you by https://octodex.github.com/. And thanks to the Help Documentation for clarifying when to use Onion Skin versus Swipe!
When you’re viewing changes to a markdown file, you have the option to compare the rendered versions in the diff view.
Let’s say you wanted to view the diff of my latest commit to my README.md in my random-example repo. By default you are looking at the raw markdown contents, i.e. the “source diff.”
But suppose you wanted to view the actual rendered markdown file as a diff. Click on the Display the Rich Diff button located in the upper right.
Now you’ll see the diff of the README.md file as a rendered file.
Personally, I’m not a fan of the inline diffs that make you do homework to figure out what’s being added and what’s being removed.
For example, if you go to the Code – Commits page and click on the commit id for a given commit, as shown in the illustration below,
You’re taken to a page that shows the diffs as inline or unified for the file.
Fortunately, there’s a split button in the upper right hand corner that says Unified | Split.
Clicking on Split portion of the button will show the before and after changes side by side, which is just my personal preference.
Suppose you want to see what changed between two commits on a particular branch. First, you can go to the Code tab and change the desired branch (see previous tips on how to do this).
Next click Commits link,
and navigating to the desired commit, you can click on the commit id (as highlighted in the image below).
Now you can see all the changes for that particular commit.