I have the following script:
The current branch feature/dashboard.
feature/dashboard
I have a raw file, tmp/dashboard_bulk.js(appeared from my browser)
tmp/dashboard_bulk.js
I would like to compare it with a tracked file app/assets/javascripts/audience/dashboard_bulk.jsthat is on a branch master(again, not my current branch).
app/assets/javascripts/audience/dashboard_bulk.js
master
Thus, the source file is not tracked, and the target file is on a different path in another branch.
Is there any way to do this?
git diffdoesn't seem to mind if you give it a path that is not being tracked.
git diff
Syntax for specifying a file in another branch branch:path/to/file.
branch:path/to/file
, diff -
git diff \ master:app/assets/javascripts/audience/dashboard_bulk.js \ tmp/dashboard_bulk.js
Source: https://habr.com/ru/post/1547445/More articles:CBP peripheral connection continues to disconnect after DiscoverServices - iosCustomize contact card color dynamically for iOS - iosAdd resume / additional text to alertDialog for individual selection items - androidCollection of nested MVC models - c #Finding the difference between consecutive numbers in a list (Python) - pythondjango-debug-toolbar Doesn't work with jQuery on Django website - jqueryMagento Collection Iterator - Cannot Get Additional Attribute - magentoHow to navigate two directories up a ruby - ruby | fooobar.comAdding voice features on Android Wear - androidHow can I ignore testing errors with the gradle robolectric plugin? - androidAll Articles