Comments (7)
Reversing/reverting hunks and selected lines are the only features keeping me from switching from SourceTree.
from sublime_merge.
This has been added in dev build 2024!
from sublime_merge.
Here's a way to at least check out files:
[
{ "caption": "-" },
{
"caption": "Reset file to this version",
"command": "git",
"args": {"argv": ["checkout", "$commit", "$path"]}
}
]
Save in your user folder as File.sublime-menu.
from sublime_merge.
Isn't this usually a problem of having committed unrelated changes within the same commit previously? If a hunk could work on it's own it should have been committed as a single commit in the first place... While it may come in handy, it may promote not committing atomic changes.
If you need to revert a hunk, you should probably revert the complete commit without yet committing it, then only stage the hunks that need to be reverted, commit, then discard the rest.
So I think it could be useful to have a context menu item "Revert without committing" aka git revert --no-commit
. That way, you could either squash multiple reverts into one, or stage just one reverting hunk and discard the rest.
from sublime_merge.
Isn't this usually a problem of having committed unrelated changes within the same commit previously?
No. What if you made a fix for an issue which containes many code lines. During review another guy finds a regression in maybe one or two lines, which he wants to revert.
This might not be an everyday scenario, but I was sometimes faced to it here and there.
If you need to revert a hunk, you should probably revert the complete commit without yet committing it, then only stage the hunks that need to be reverted, commit, then discard the rest.
- Of course, you can always take the long way - or the sublime one.
- This PR was made with the functionality of GitExtensions in mind and to make all git related functions (stash,stage,revert) work the same way on all pieces of code.
from sublime_merge.
Workaround for reverse hunk:
https://forum.sublimetext.com/t/reverse-hunk-workaround/44645
from sublime_merge.
Nice job.
from sublime_merge.
Related Issues (20)
- Clone via SSH with Putty/plink for Windows on ARM fails to establish a connection HOT 1
- Commit operation is very slow compared with doing "git commit" HOT 2
- Add "pull --prune" option
- If user explicitly chooses Sublime Text.app as the Editor, files don't open
- Commit view looks broken on one repo HOT 1
- Diff not match git output HOT 1
- Push fails with 'command not found'
- LFS Label missing from files tracked in LFS with uppercase file extension HOT 1
- Summary stuck with submodule change
- Menu bar not working
- Sublime Merge reporting license is expired for a valid license
- Key Bindings for Merge Tool not working HOT 2
- enable color-coding or otherwise grouping of tabs HOT 1
- performance slow when using in a giant project with thousands of commiter and six years git commit history HOT 2
- Support for numbered/concatenated arguments and char escaping HOT 1
- Diff editing mode
- Navigate to commit not working with collapsed merge commits HOT 1
- Bug when selecting multiple commits HOT 1
- Named character classes not followed in ignore patterns HOT 1
- Random Staged Files displaying when working directory is clean HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sublime_merge.