New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export difference between revisions #1361
Comments
@tomasfejfar: What about files that were deleted from the old to the new revision? |
The deleted files should be somehow displayed (and are removed manually, or not cared for - they stay where they are). Generally - delting files is quite uncommon (at least in my case), and if some files are deleted it's not imperative, that they have to be removed from the server too (it's non-sensitive stuff like images, etc.)... works well for simple scenarios. And it's mostly used for such. Export diff and copy over FTP is not usually used for complex stuff - you have some deploy process for it. |
+1 This is something I really miss since TortoiseSVN |
This has been closed as completed, how to do that now? Do I need the git-ftp plugin to do so? |
At the time the issue was closed, GitHub didn't had the "Close as not planned" feature that better describe the decision.... |
Ah I see, unfortunate, this would be really nice. We sometimes have old spike branches that we want to "modernize" and would be nice to get the full diff and then file-by-file re-introduce changes into the current state of the solution. Rebasing or merging is oftentimes very cumbersome due to all files being moved, etc. and I like the manual approach in that situations. |
But you can compare any commit with another commit (and use git-range-diff for common commits), then cherry pick. For the original question, you can use worktree to get additional "export" directories (if you do not want to checkout in the current sorking tree). |
There is a feature to export in a zip all the files modified between two revisions :
That's it, all files created or modified will be in the archive. Obviously if there is files to delete, you'll have to do it yourself. |
A long time ago I used a git deploy process. I wrote a hook that looked to see if x deploy branch had changea in a push. I set this repo up on a a AWS ec2 instance( before serverless stuff was learned). So I set up a remote that pointed to the AWS repo on ec2 and had it protected with an ssh push where I had the key. So if I merged work into the deploy branch and pushed to that remote, it would deploy the site. All it was a checkout of the branch so all was deployed all the time. |
Indeed, it seems possible... |
@Itori: Thank you, that works like a charm - great! 💯 Edit: doesn't work correctly though if you merged main into the branch in the meantime :-/ |
Surprising it didn't work with a merge as it's a commit, I don't see any reason why it shouldn't work. I develop this feature a while back to deploy differences between 2 versions in a php website but it doesn't seems usefull now with all the CI/CD process. |
Ref: #1221 (comment)
Use case:
You have a project still deployed using FTP or plainly too large to redeploy on every single change. You create couple of revisions and need to deploy them.
Current solition:
Proposed solution:
Export changes with [ref]. That will create a summarised diff of files that were changed and export them into
a) selected folder
b) some concrete folder
c) folder, possibly relative to repo
d) some concrete folder + repo_name subfolder
C or D seems to be the best solution for the use case as it's mostly repetitive activity and predictable folder would allow better user-land automation for FTP, lint or practically any build procedure. I'm little against displaying a "select folder" dialog every time (A), even though it may be useful from time to time, because it's flustrating for the repetitive scenario.
The text was updated successfully, but these errors were encountered: