All Questions
13 questions
0
votes
1
answer
368
views
Undo a pull request and stash it
I pulled my 'preprod branch' into my 'master branch' which was 8 commits ahead of master and when I pulled it, It got commited to master but haven't pushed to master yet.
I want to revert the pull ...
9
votes
3
answers
12k
views
Can't discard changes in git
A week or two ago I took some files that I had been archiving with a simple find |sed|tar|xz|gpg bash script, unpacked them all, and put their contents in a git repo, commited, put the next archives ...
0
votes
1
answer
1k
views
Git: Is it possible to recover my local unstaged changes (which were once staged) after a git reset --hard? [duplicate]
I had some changes in my local branch which I added using git add -A.
Then for some reasons I unstaged these changes by doing git reset.
Then I opened GitExtensions and clicked on Reset all changes. (...
1
vote
1
answer
620
views
Missing untracked files after soft reset
Originally I had commited to the wrong branch, wanted to take that back and commit to the right one (master). I wanted to go the route that is suggested in the accepted answer from How to fix ...
0
votes
1
answer
902
views
GIT remove changes of specific commit from current HEAD
Assume
I have recent changes added or not added to the index. Now I'm cherry-picking a specific commit without creating a new commit on my HEAD ...
git cherry-pick -n <commit>
How do I remove ...
2
votes
0
answers
769
views
Git stash and reset not working as expected
I have unstaged changes (in tracked files) that I want to delete. I try running git stash then git stash drop, and the unstaged changes are still there. I try running git add -A and then git reset --...
7
votes
4
answers
4k
views
How do I save work in progress without using git-stash?
I have a git directory with this situation:
ProgSoul@PROGSOUL-LENOVO:~/esercizio3_2$ git status
Sul branch master
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
...
5
votes
2
answers
6k
views
Undo git reset --hard after git stash pop
I had some changes in the stash that I attempted to recover using git stash pop. There were some merge conflicts, and rather than resolving them, I decided to just reset it. Unfortunately, in a moment ...
0
votes
1
answer
2k
views
Is "git clean" followed by "git stash clear" redundant when creating a pristine checkout?
I would like to write a script that guarantees a successful Git checkout without intervention from the user. I don't mind dumping anything that cannot be solved without user intervention: for example, ...
1
vote
2
answers
4k
views
How do I rework a git merge commit?
I would like to amend a merge commit which failed a unit test on our continuous integration server, but I don't want to leave a commit which fails tests in the history.
Since this commit was only ...
13
votes
7
answers
16k
views
Git cannot undo modified files
I just want to get back to a clean working directory, exactly as it was after my last commit. Git is reporting to me a load of file modifications that I haven't made, so I suspect it's something to do ...
0
votes
1
answer
551
views
Git recover stashed changes after merge --no-ff
I frequently use "git stash" and "git stash pop" to save and restore changes in my working tree. This is what I did and my previous uncommitted changes now are gone.
git stash -u
git checkout master
...
3985
votes
14
answers
1.1m
views
Move existing, uncommitted work to a new branch in Git
I started some work on a new feature and after coding for a bit, I decided this feature should be on its own branch.
How do I move the existing uncommitted changes to a new branch and reset my ...