707 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
157
views
Did Git 2.51 change the internal format/representation of stash entry?
I'm reading a post on the github.blog website about the changes introduced in Git version 2.51, and I came across a section that really confused me — it’s about the internal representation (format) of ...
0
votes
2
answers
140
views
Why does git stash pop --index fails when there are staged but uncommitted content?
I'm trying to understand how git stash works and I'm running into a problem when I try to restore the index (--index) when I have some uncommitted content.
I couldn't figure out what was happening ...
0
votes
1
answer
121
views
When does git stash pop/apply cause conflicts?
I understand how Git detects conflicts in some other commands:
git merge – Git finds the merge base (last common commit) and checks which side has made changes. If both sides changed the same lines, ...
0
votes
2
answers
60
views
How to manage untracked changes that show as directories?
I'm having a difficult time with untracked changes shown as directories in git status. This is particularly problematic when the number of untracked changes is huge.
Now there are some folders I did ...
1
vote
2
answers
125
views
When stashing, why is the commit that represents the working directory (WIP) a merge commit?
I stashed some changes via git stash and then did git log --oneline --graph --all. I got the following:
* 6088953 (refs/stash) WIP on main: 62c9742 G
|\
| * 5b46ef8 index on main: 62c9742 G
|/
* ...
0
votes
1
answer
70
views
Git stash got interrupted with `Unlink of file 'somefile' failed. Should I try again?` - lost stash
So I did git stash -u with my local files.
I got this error:
Unlink of file 'data/somefile.pdf' failed. Should I try again? (y/n)
The reason why I have a PDF file in the repo is because it's a test ...
0
votes
4
answers
292
views
What is the difference between a stash and a regular commit?
From Git - git-stash Documentation:
A stash entry is represented as a commit whose tree records the state of the working directory, and its first parent is the commit at HEAD when the entry was ...
0
votes
0
answers
26
views
Is it possible to stash an ongoing rebase [duplicate]
I started a complicated rebase, it'll take hours. However, we asked me to do a little fix on the develop branch.
Is is possible to stash my ongoing rebase so that I can do the little fix an come back ...
0
votes
0
answers
50
views
git file always shows modified vs local index
On Windows working with C# files
I think what may be happening here is that in the local index the file has LF line-endings.
So even when git restore myfile or git checkout myfile git immediately ...
3
votes
1
answer
84
views
How to view the changes to a particular file in stash in git?
I am trying to find what the modification a particular stash, say stash@{1}, made to a file.
I tried using the command:
git stash show -p "stash@{1]" -- {filename}
but got the error too ...
-1
votes
4
answers
526
views
Can I easily cherry pick some commit to stash?
I'd like to pick some commit from the history and load its changes to my stash, just to use it freely anywhere. Is it possible?
Edit: thanks for your answers, maybe I'd add that I hoped for some way ...
1
vote
2
answers
76
views
intended flow when git stash pop gets conflicts
I ran git stash pop and got some conflicts. It's a similar experience to conflicts from a rebase or merge, and I've been resolving them.
I don't really understand what flow I'm supposed to be ...
4
votes
2
answers
120
views
Git-hook to show if I've got a stash on the checked out branch
The following has happened a couple of time and I'm looking for an automated way to catch myself before I repeat the mistake. Solutions saying "just remember" or "just don't do that&...
0
votes
2
answers
237
views
How to detect when git stash push reports "No local changes to save"?
I'm using git stash push -a in a script to save uncommitted changes and then sometime later run git stash pop in the same script to restore the stashed changes. I've run into a problem in which git ...
1
vote
1
answer
77
views
Quick way to organize and delete local stashes
I want to stash my changes, but I often have temporary stashes that accumulate, which I want to delete. I also have important stashes, so "drop all" isn't an option.
Deleting stashes one by ...