Check out and lost local files

There are many files that were in local. During initial development of some modules

many files were added  and lots of changes were done in a branch called cycle4

 

In the sourcetree develop branch is accidentally checked out

we lost all the new files and 6 days of change

Please help us resolve

 

1 answer

0 vote

Hi Kumanan! First of all, let me clarify that what you described does not look like a Sourcetree question, but like a Git question.

By default, Git should not overwrite local changes when you do a checkout. Did you use --force by any chance?

Did you added them before? If they were not added (which means git knows nothing about those files), then I'm afraid they're lost/
If you did git add previously, it will be possible to recover them but it will involve quite a lot of work. You can read more about it in the first answer of this post here.

Hope that helps!

Ana

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

22,056 views 26 11
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you