Skip to content
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

Git Stash #153

Open
InRe-Dan opened this issue Apr 19, 2023 · 0 comments
Open

Git Stash #153

InRe-Dan opened this issue Apr 19, 2023 · 0 comments
Assignees

Comments

@InRe-Dan
Copy link
Collaborator

InRe-Dan commented Apr 19, 2023

Implement a system which allows the user to stash changes and pop changes.
git stash is a command which allows users to "stash" any uncommited changes on their current branch, so that they can check out to different branches or do other operations on the current branch.
More information on git stash
The top bar of each tab should have a "Stash" and a "Pop" button. "Stash" will stash the current changes and "Pop" will apply the previously stashed changes onto the current directory.
When these buttons are pressed, there should be no pop-up windows unless there has been an error. Be aware that the current AlertBuilder system is broken, but please write code assuming it will be fixed: don't expect alerts to display correctly for now.
To implement stashing and popping, you should use JGit's StashCreateCommand and StashApplyCommand respectively. You can find the documentation for both of these commands here:
https://archive.eclipse.org/jgit/docs/jgit-2.0.0.201206130900-r/apidocs/org/eclipse/jgit/api/StashCreateCommand.html
https://archive.eclipse.org/jgit/docs/jgit-2.3.1.201302201838-r/apidocs/org/eclipse/jgit/api/StashApplyCommad.html
The Create and Apply principles aren't as simple as Stash and Pop, but your implementation will basically boil down to calling both commands without actually setting any parameters on them.

Recommended reading for this issue is guides on stashing and popping, to get a better idea of the purpose and general use of this Git feature. One such guide is here: https://opensource.com/article/21/4/git-stash

@ming-0302 ming-0302 self-assigned this Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants