Reputation: 6823
I have made a bunch of changes to a repo.
When the changes were completed I completed a stage, staging all those changes. Then committed them locally.
Once complete I attempted a push, but the repo had changed.
I then completed a rebase (instead of merge) on the master. This found a conflict on a small JSON file.
This was the only conflict that showed, I clicked continue to (what I thought) would merge that in. However, my commit has now been pushed with only that single file change.
The other file changes have disappeared. Is there a way to get those back?
Upvotes: 0
Views: 112
Reputation: 2283
As long as you committed the changes need, you can get back those changes.
git log
. git checkout commit-hash
(where "commit-hash" is the hash you found), or you can checkout individual files into the repository in its current state by doing git checkout commit-hash path-to-file
.Upvotes: 1