Use Towergit’s Stash to Pull Remote Changes Without Losing Your Work
When you have uncommitted edits and need to fetch new commits, Towergit’s Stash lets you temporarily set them aside. This guide walks through the steps, shows a worked example, and explains the trade‑offs.
25 Dec 2025, 00:50 UTC

Problem: Uncommitted Changes Block a Pull
When you’re working on a file and a teammate pushes new commits, a git pull will fail if your working tree contains uncommitted changes. Git protects you from accidental overwrites, but that protection can stall progress. You need a way to keep your edits safe while you update the branch.
The Stash Feature in Towergit
Towergit offers a context‑menu Stash command that creates a lightweight, named stash entry. It captures both the working‑tree modifications and the index state, but it does not create a commit. The stash list appears in Towergit’s sidebar, giving you a clear view of what’s stored and when you want to restore it.
Step‑by‑Step Example
- Make a local change – Open any file, edit a line, and save. Run
git statusin the terminal to confirm the file is listed under "Changes not staged for commit". - Stash the change – In Towergit, right‑click the project root (or any folder) and choose Stash. In the dialog, name the stash (e.g., work‑in‑progress) and click Stash. The file will revert to the last committed state, and the stash entry will appear in the sidebar.
- Pull the latest remote commits – Click the Pull button or use the menu Branch > Pull. Towergit will fetch and merge the remote changes into your current branch.
- Reapply the stashed work – After the pull completes, right‑click the repository root again, choose Pop Stash, and select the stash you created. Towergit will re‑apply the changes to the updated working tree. If conflicts arise, Towergit will present the usual merge conflict UI for resolution.
- Verify the result – Open the file to ensure the original edit is present and that the file reflects the latest remote changes. Run
git statusto confirm no pending changes remain.
Trade‑Offs and Limitations
- Local‑only storage – Stashes exist only on your machine. They are not part of the repository history and will not be shared with teammates automatically.
- Potential merge conflicts – If the branch has diverged significantly during the pull, popping the stash may trigger conflicts that require manual resolution. Use
git stash applyinstead ofpopif you want to keep the stash for later. - No commit history – Because a stash is not a commit, you cannot later cherry‑pick it or reference it from other branches. It’s a temporary workspace.
Action Plan
When you encounter the "uncommitted changes" barrier:
- Use Towergit’s Stash to set aside edits.
- Pull or fetch the latest changes.
- Pop or apply the stash to restore your work.
- If conflicts occur, resolve them using Towergit’s merge tool.
By adopting this workflow, you keep your local modifications safe while staying up‑to‑date with the team’s progress, all without creating unnecessary commits or losing context.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.