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
¿Can you add a warnig to move? #473
Comments
Related: #124 Also FYI, move actually isn't that dangerous. Any commits you might "lose" with move are easily recoverable from the command line. I agree it's bad UX though. |
What does 'move' do? And how can I recover my commits? |
Oh, I found #428. |
Yeah, for the record, in the future you can recover any commits lost this way by simply moving the branch back. Even if the commits disappear from ungit's UI they do still exist, and you can use the command line to move the branch back to the same commit it was pointing at before you moved it. Basically, moving a branch is very similar to a hard reset, which can be recovered from like this:
|
Thank you for the information! |
Just to chime in, just because commit nodes are not showing in ungit, it doesn't mean commits are lost. In fact, I believe you can recover from any actions in git through git-ref once a change is committed and you are willing to go through the logs. (Now our resident git expert @Ajedi32 may need to confirm on this...) Closing as this is not an issue. |
@codingtwinky Yeah, I did kinda explain that already. Once a change is committed to git, it's very, very hard to lose it. Unless you explicitly tell it to, git won't delete anything from its database that isn't older than two weeks. And that's for content that isn't reachable anywhere, even through reflog. For stuff that is reachable through reflog (and only through reflog), the time is 30 days (by default). And obviously stuff reachable through regular branches and tags is never deleted (since that would kinda defeat the purpose of git). IMO #124 is the correct way to solve the actual problem being encountered in this issue. Users shouldn't need to use the command line to fix problems they created in the ungit UI. |
Hi,
I love ungit, but "move" has quit an inocent name for such dangerous function.
Can you add a warnig to move?
Or an option to hide move?
The text was updated successfully, but these errors were encountered: