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

git commit issue

thejas jayaram Dec 29, 2014

We have migrated from svn to git lately. And I am not good with git till now. My problem is that, I have committed some files and it cause to lose the file changes others did. But the changes are there in my instance but not in any others(they  lost what they committed). The graph shows the details. The top two commits I have marked caused the issue. Please help me to resolve the issue. I am not using commands for git, but tortoise git UI.

 

git.png

1 answer

1 vote
Seth Dec 30, 2014

When you push your changes to the remote (probably "origin"), do NOT "force" push. If your push fails, that usually means you need to merge changes that others have pushed to origin with your own changes (that merge must be done locally). After the merge, you should be able to succeed at pushing (still no "force").

Please keep in mind that git is fundamentally different from SVN, and even the most basic operations work very differently. Please read the Git book (Sections 1.1 - 1.3 and Chapters 2 and 3) before doing anything else in git.

thejas jayaram Dec 30, 2014

Thank you for the reply. Is there any way to resolve this? will rebase help to resolve the issue?

Seth Dec 31, 2014

You (or your teammates) will probably need to go to the command line to retrieve the lost commits. Search google and stackoverflow for your issue, and keep an eye out for references to "git reflog".

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

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

3,063 views 1 20
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