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

Last 10 days of work is lost after git push --force Edited

I tried to add pattern to GIT LFS today and all the work in the last 10 days are gone!!! The last commit seen is 11th Nov. All the work in between are all gone!!!

Last week I added *.html to GIT LFS. Today I tried to add *.{html, svg} and this is what I get!

GITLFSProblem.png

$ g reflog show --all
a7406c404 (HEAD -> UpgradeDotNetCore, origin/UpgradeDotNetCore) refs/remotes/origin/UpgradeDotNetCore@{0}: update by push
a7406c404 (HEAD -> UpgradeDotNetCore, origin/UpgradeDotNetCore) refs/heads/UpgradeDotNetCore@{0}: commit: Fix GIT
a7406c404 (HEAD -> UpgradeDotNetCore, origin/UpgradeDotNetCore) HEAD@{0}: commit: Fix GIT
1eaf71063 refs/remotes/origin/UpgradeDotNetCore@{1}: update by push
1eaf71063 refs/heads/UpgradeDotNetCore@{1}: commit: Track wwwroot
1eaf71063 HEAD@{1}: commit: Track wwwroot
207186a6c refs/heads/UpgradeDotNetCore@{2}: branch: Created from refs/remotes/origin/UpgradeDotNetCore
207186a6c HEAD@{2}: checkout: moving from dev to UpgradeDotNetCore
be3b63495 (origin/dev, origin/HEAD, dev) refs/heads/dev@{0}: clone: from https://kokhow@bitbucket.org/4xlabs/bz-frontend.git
be3b63495 (origin/dev, origin/HEAD, dev) refs/remotes/origin/HEAD@{0}: clone: from https://kokhow@bitbucket.org/4xlabs/bz-frontend.git
be3b63495 (origin/dev, origin/HEAD, dev) HEAD@{3}: clone: from https://kokhow@bitbucket.org/4xlabs/bz-frontend.git

Any advice and insight is appreciated.

1 answer

0 votes
Ana Retamal Atlassian Team Nov 25, 2019

Hi @kokhow.teh ,

Thanks for reaching out!

This is not an issue with Sourcetree or Bitbucket, this is how Git works. The good thing about Git is that it is a version control system, so your work is not lost, you just need to go back to a previous version before you did the force push and you'll be able to continue working from that point on.

You can learn different ways of undoing changes in one of our tutorials. You can also refer to the official Git documentation for further explanation.

Hope that helps,

Ana 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Sourcetree

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

4,935 views 0 12
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