It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Deleted feature branch

Amit Wankhade Apr 28, 2015

I had a stash on a feature branch which I deleted. Is there any way to get those stashed changes?

1 answer

3 votes
Adam Ahmed Atlassian Team Apr 28, 2015

You mean `git stash`? Those are global - you can restore them on top of any commit. Just run `git stash pop` to apply the latest one to your current working directory.

If you want to get your actual committed changes back, try looking at your reflog (`git reflog`) to see a list of how you've moved your working directory around. Until git does a garbage collection, you can still checkout a commit by its SHA hash. So find the has in the log and try to check it out. Then you can create a new branch based on it to save it.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

1,652 views 1 18
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you