12/29/2023 0 Comments P4merge visual studioKind of like you can drag the pictures on an iPhone to view the previous or next one. It would be interesting to leverage a (mouse drag – or text command ) to “pan” between versions through file diffing view. (easily) AND show the different versioned files side by side AND make it easy and intuitive to go back in time. The problem of having a file diff between version E & F and then needing to look at the previous version to E. On to the feature request… What problem is this new feature trying to solve? My only problem is I’m not accustomed to the linux style diffing, and still prefer the side/by side file diffing. One thing do like about the above, is the list of revisions and how they are right there in your face. Notice how there’s a list of changes to the file, and under that the diff of the previous version to the selected version. (Except for diffing files)īelow is the UI when running the “gitk build-tasks.ps1” in the root of the StatLight project. I’ve known about this tool, however am trying to keep with the command line tools. After a quick search I came across the “ gitk” command. However this was the first time I had to look at a file further back in time than the head. Up until this point I had only diff’d uncommitted files with the most recent version of that file, and I already wired a visual diffing tool where I could then use the “git difftool …” command to review differences. The other day needed to review changes in a file back in the commit history. I know it’s not the best place to take full advantage of Git however, it’s working for me. I’ve been working git solely through the command line (in PowerShell actually). And when I get to the point where I need to do something I’ve never done, well I go figure it out, and it becomes another part of the personal Git toolbox. Since that initial plunge, I’m now in a place where much of it still scary unknown however, I know enough get what I need done. Here’s a post where I talk about how I like to integrate these tools when working with TFS and Visual Studio - /2009/08/development-environment-mergecompare.htmlĪ couple months ago, I _slowly_ started learning Git. Personally I’m fond of two different tools (mostly because they’re easy to find/install and setup). Most of us have probably tried different versions of a file diffing tool. Ĭmd = $HOME/dotfiles/tools/merge-wrapper.js \ " $BASE\" \ " $LOCAL\" \ " $REMOTE\" \ " $MERGED\" Diffing tool feature request You can add the below to your ~/.gitconfig file and when you use git difftool our new merge-wrapper will be used to pick diff tools based on file extension. Say we placed our merge script in the following directory: $HOME/dotfiles/tools/merge-wrapper.js. Now that we've created our merge wrapper script we need to tell git how to use it. I'd be happy to take contributions of other diff tools in this gist if you leave a comment with yours.īelow was an attempt at using a bash script to manage what I do above, it'll work for some, but I didn't want to maintain this - prefer the JS version instead. Leave me a comment (either here - or in the gist) of what diff tool you added. If you want to change which tool is used per file extensions you can modify the diffLookup hash to map various extensions to whatever tool you setup. Modify which diff tool is used per extension: If you want to extend the script to add support for your own diff tool, just create a new function that returns an object following the pattern of the existing createP4MergeCommand or createOpenDiffCommand. I haven't yet tried to run this on windows, but suspect we can wrap the merge-wrapper.js in a. js version (above that) since it is easier for me to maintain. sh file (bottom), but changed over to the. Below I have 2 samples of a merge script. To allow us the flexibility we want to determine which diff tool should be used for different file extensions, we need to break out the logic in to an external script. I'm going to put this here so I can find it later. How to setup git to allow different merge/diff tools based on file extension.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |