The reflog is your saviour.

Have a look at what it says (take a copy of the main parts).

You can use it to find out the hash values for the various points you want to create new 'magic' branches for your features, and then you can move the references for those remote tracking branches back to match some old/existing location on the true remote. git update-ref is the command to read about.

Take it slowly and plan a few steps ahead and it will go fine.


Philip

On 04/03/2019 16:34, Keshav Bathla wrote:
Hello dev's

Currently while working in feature branch i have done some mistake so due to which i have to come behind one commit (git reset ---hard HEAD^ ) but the problem i was facing now is that the deleted commit is on remote feature branch. So now when after changes on local feature branch and try to push the git thows error that my remote branch is behind one commit.

Now the solution i have in mind is to force push (git push -f origin feature branch) but i was strongly discouraged by my project community to not to do force pushing and i know it's dangerous too.

So please help me to find alternative solution for that.
Thanks
--
You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com <mailto:git-users+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Git for 
human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to